Commit 7fa5941f authored by Russ Cox's avatar Russ Cox

make "size 6.out" work on mac.

R=r
DELTA=11  (6 added, 0 deleted, 5 changed)
OCL=23629
CL=23631
parent c8476472
...@@ -361,7 +361,7 @@ asmb(void) ...@@ -361,7 +361,7 @@ asmb(void)
if (!debug['s']) if (!debug['s'])
nl += 3; nl += 3;
if (!debug['d']) // -d = turn off "dynamic loader" if (!debug['d']) // -d = turn off "dynamic loader"
nl += 2; nl += 3;
lputl(nl); /* number of loads */ lputl(nl); /* number of loads */
lputl(machheadr()-32); /* size of loads */ lputl(machheadr()-32); /* size of loads */
lputl(1); /* flags - no undefines */ lputl(1); /* flags - no undefines */
...@@ -846,15 +846,20 @@ machdylink(void) ...@@ -846,15 +846,20 @@ machdylink(void)
if(debug['d']) if(debug['d'])
return; return;
lputl(2); /* LC_SYMTAB */
lputl(24); /* byte count - 6 words*/
for(i=0; i<4; i++)
lputl(0);
lputl(11); /* LC_DYSYMTAB */ lputl(11); /* LC_DYSYMTAB */
lputl(80); /* byte count */ lputl(80); /* byte count - 20 words */
for(i=0; i<18; i++) for(i=0; i<18; i++)
lputl(0); lputl(0);
lputl(14); /* LC_LOAD_DYLINKER */ lputl(14); /* LC_LOAD_DYLINKER */
lputl(28); /* byte count */ lputl(32); /* byte count */
lputl(12); /* offset to string */ lputl(12); /* offset to string */
strnput("/usr/lib/dyld", 16); strnput("/usr/lib/dyld", 32-12);
} }
void void
...@@ -889,8 +894,9 @@ machheadr(void) ...@@ -889,8 +894,9 @@ machheadr(void)
a += 20; /* bss sect */ a += 20; /* bss sect */
a += 46; /* stack sect */ a += 46; /* stack sect */
if (!debug['d']) { if (!debug['d']) {
a += 6; /* symtab */
a += 20; /* dysymtab */ a += 20; /* dysymtab */
a += 7; /* load dylinker */ a += 8; /* load dylinker */
} }
if (!debug['s']) { if (!debug['s']) {
a += 18; /* symdat seg */ a += 18; /* symdat seg */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment