Patch to eliminate garbage in DJGPP execs
Mark E.
snowball3@bigfoot.com
Wed Jul 5 12:11:00 GMT 2000
Well, I've managed to find a partial solution to the garbage. I can change
the linker script like from:
.text 0x1000+SIZEOF_HEADERS : {
/* .text section contents here. */
}
to
.text 0x1000+SIZEOF_HEADERS : {
/* .text section contents here. */
} = 0
with the same change to .data and this eliminates the garbage between
sections (as far as I can tell anyway). Then, I went for the gold and tried
to eliminate the garbage from between the headers and the .text section, but
it wouldn't work. Here's the attempted change I made:
.text SIZEOF_HEADERS : {
. += 0x1000
/* .text section contents here. */
} = 0
This didn't work because the .text section still started at the same place so
still had that garbage, and then added 0x1000 fill bytes to the start of
section except of course in the wrong place.
Is there anyway I can convince the linker to put the .text section where I
want it or have I gone as far as I can here?
Mark
More information about the Binutils
mailing list