[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/unexmacosx.c
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/src/unexmacosx.c |
Date: |
Tue, 04 Feb 2003 09:03:47 -0500 |
Index: emacs/src/unexmacosx.c
diff -c emacs/src/unexmacosx.c:1.3 emacs/src/unexmacosx.c:1.4
*** emacs/src/unexmacosx.c:1.3 Sun Dec 1 01:33:53 2002
--- emacs/src/unexmacosx.c Tue Feb 4 09:03:13 2003
***************
*** 276,282 ****
if (object_name != MACH_PORT_NULL)
mach_port_deallocate (target_task, object_name);
!
address += size;
}
}
--- 276,282 ----
if (object_name != MACH_PORT_NULL)
mach_port_deallocate (target_task, object_name);
!
address += size;
}
}
***************
*** 329,343 ****
else
{
r = (struct region_t *) malloc (sizeof (struct region_t));
!
if (!r)
unexec_error ("cannot allocate region structure");
!
r->address = address;
r->size = size;
r->protection = info.protection;
r->max_protection = info.max_protection;
!
r->next = 0;
if (region_list_head == 0)
{
--- 329,343 ----
else
{
r = (struct region_t *) malloc (sizeof (struct region_t));
!
if (!r)
unexec_error ("cannot allocate region structure");
!
r->address = address;
r->size = size;
r->protection = info.protection;
r->max_protection = info.max_protection;
!
r->next = 0;
if (region_list_head == 0)
{
***************
*** 349,361 ****
region_list_tail->next = r;
region_list_tail = r;
}
!
/* Deallocate (unused) object name returned by
vm_region. */
if (object_name != MACH_PORT_NULL)
mach_port_deallocate (target_task, object_name);
}
!
address += size;
}
--- 349,361 ----
region_list_tail->next = r;
region_list_tail = r;
}
!
/* Deallocate (unused) object name returned by
vm_region. */
if (object_name != MACH_PORT_NULL)
mach_port_deallocate (target_task, object_name);
}
!
address += size;
}
***************
*** 498,504 ****
nlc = mh.ncmds;
lca = (struct load_command **) malloc (nlc * sizeof (struct load_command
*));
!
for (i = 0; i < nlc; i++)
{
struct load_command lc;
--- 498,504 ----
nlc = mh.ncmds;
lca = (struct load_command **) malloc (nlc * sizeof (struct load_command
*));
!
for (i = 0; i < nlc; i++)
{
struct load_command lc;
***************
*** 513,519 ****
if (lc.cmd == LC_SEGMENT)
{
struct segment_command *scp = (struct segment_command *) lca[i];
!
if (scp->vmaddr + scp->vmsize > infile_lc_highest_addr)
infile_lc_highest_addr = scp->vmaddr + scp->vmsize;
--- 513,519 ----
if (lc.cmd == LC_SEGMENT)
{
struct segment_command *scp = (struct segment_command *) lca[i];
!
if (scp->vmaddr + scp->vmsize > infile_lc_highest_addr)
infile_lc_highest_addr = scp->vmaddr + scp->vmsize;
***************
*** 647,653 ****
}
else
unexec_error ("unrecognized section name in __DATA segment");
!
printf (" section %-16.16s at %#8x - %#8x (sz: %#8x)\n",
sectp->sectname, sectp->offset, sectp->offset + sectp->size,
sectp->size);
--- 647,653 ----
}
else
unexec_error ("unrecognized section name in __DATA segment");
!
printf (" section %-16.16s at %#8x - %#8x (sz: %#8x)\n",
sectp->sectname, sectp->offset, sectp->offset + sectp->size,
sectp->size);
***************
*** 675,681 ****
for (j = 0; j < num_unexec_regions; j++)
{
struct segment_command sc;
!
sc.cmd = LC_SEGMENT;
sc.cmdsize = sizeof (struct segment_command);
strncpy (sc.segname, SEG_DATA, 16);
--- 675,681 ----
for (j = 0; j < num_unexec_regions; j++)
{
struct segment_command sc;
!
sc.cmd = LC_SEGMENT;
sc.cmdsize = sizeof (struct segment_command);
strncpy (sc.segname, SEG_DATA, 16);
***************
*** 687,693 ****
sc.initprot = VM_PROT_READ | VM_PROT_WRITE;
sc.nsects = 0;
sc.flags = 0;
!
printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
sc.segname, sc.fileoff, sc.fileoff + sc.filesize,
sc.filesize);
--- 687,693 ----
sc.initprot = VM_PROT_READ | VM_PROT_WRITE;
sc.nsects = 0;
sc.flags = 0;
!
printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
sc.segname, sc.fileoff, sc.fileoff + sc.filesize,
sc.filesize);
***************
*** 696,702 ****
unexec_error ("cannot write new __DATA segment");
delta += sc.filesize;
file_offset += sc.filesize;
!
if (!unexec_write (curr_header_offset, &sc, sc.cmdsize))
unexec_error ("cannot write new __DATA segment's header");
curr_header_offset += sc.cmdsize;
--- 696,702 ----
unexec_error ("cannot write new __DATA segment");
delta += sc.filesize;
file_offset += sc.filesize;
!
if (!unexec_write (curr_header_offset, &sc, sc.cmdsize))
unexec_error ("cannot write new __DATA segment's header");
curr_header_offset += sc.cmdsize;
***************
*** 850,856 ****
{
unexec_error ("cannot open input file `%s'", infile);
}
!
outfd = open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
if (outfd < 0)
{
--- 850,856 ----
{
unexec_error ("cannot open input file `%s'", infile);
}
!
outfd = open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
if (outfd < 0)
{
- [Emacs-diffs] Changes to emacs/src/unexmacosx.c,
Juanma Barranquero <=