diff -urN linux-86-vanila/ld/globvar.h linux-86/ld/globvar.h --- linux-86-vanila/ld/globvar.h Tue Oct 29 23:05:22 2002 +++ linux-86/ld/globvar.h Wed Oct 30 15:57:56 2002 @@ -13,6 +13,7 @@ /* K&R _explicitly_ says extern followed by public is OK */ extern char hexdigit[]; /* constant */ extern int headerless; /* Don't output header on exe */ +extern int bigheader; extern bin_off_t text_base_value; /* Base address of text seg */ extern bin_off_t data_base_value; /* Base or alignment of data seg */ diff -urN linux-86-vanila/ld/ld.c linux-86/ld/ld.c --- linux-86-vanila/ld/ld.c Tue Oct 29 23:05:22 2002 +++ linux-86/ld/ld.c Wed Oct 30 15:56:45 2002 @@ -19,6 +19,7 @@ PUBLIC bin_off_t data_base_value = 0; /* XXX */ PUBLIC bin_off_t heap_top_value = 0; /* XXX */ PUBLIC int headerless = 0; +PUBLIC int bigheader = 0; PUBLIC char hexdigit[] = "0123456789abcdef"; PRIVATE bool_t flag[128]; @@ -172,6 +173,7 @@ data_base_value = strtoul(arg+2, (char **)0, 16); if (errno != 0) use_error("invalid data address"); + bigheader = 1; break; case 'H': /* heap top address */ if (arg[2] == 0 && ++argn >= argc) diff -urN linux-86-vanila/ld/writex86.c linux-86/ld/writex86.c --- linux-86-vanila/ld/writex86.c Tue Oct 29 23:05:22 2002 +++ linux-86/ld/writex86.c Wed Oct 30 15:57:25 2002 @@ -17,7 +17,7 @@ #define ELF_SYMS 0 #endif -# define FILEHEADERLENGTH (headerless?0:A_MINHDR) +# define FILEHEADERLENGTH (headerless?0:(bigheader?sizeof(struct exec):A_MINHDR)) /* part of header not counted in offsets */ #define DPSEG 2 @@ -620,8 +620,10 @@ offtocn((char *) &header.a_total, (bin_off_t) heap_top_value, sizeof header.a_total); - if( FILEHEADERLENGTH ) - writeout((char *) &header, FILEHEADERLENGTH); + if(bigheader) + offtocn((char *) &header.a_dbase, data_base_value, sizeof header.a_dbase); + if( header.a_hdrlen ) + writeout((char *) &header, header.a_hdrlen); } PRIVATE void writenulls(count) --- linux-86-vanila/libc/bcc/heap.c Fri Nov 1 02:43:13 2002 +++ linux-86/libc/bcc/heap.c Fri Nov 1 02:41:12 2002 @@ -44,9 +44,6 @@ js go_down add ax,[brk_addr] ! Goin up! jc Enomem - sub bx,#511 ! Safety space 512 bytes - cmp bx,ax ! Too close ? - jb Enomem sbrk_ok: #if !defined(__MSDOS__) && !defined(__STANDALONE__) @@ -121,6 +118,7 @@ #ifdef L___brk_addr char * __brk_addr = 0; /* This holds the current return for sbrk(0) */ + char * __brk(val) {