This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to eliminate garbage in DJGPP execs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]