ld: Not enough room for program headers

Michal Jaegermann michal@ellpspace.math.ualberta.ca
Sun Sep 10 22:01:00 GMT 2000


Franco Broi wrote:
> 
> 
> I tried to change the script, but ld was using an internal script.
> When I made it use one of the scripts in lib/ldscripts, I got other
> errors about bad MRI in OUTPUT_FORMAT or something. Even when I
> extracted the script it was using (using --verbose) it would still
> produce an error when reading it back unchanged.

Franco,
could you please show _precisely_ what you were doing and how?  I tried
to repeat on my Alpha roughly what you described and things do work for
me, i.e. I can read back a linker script extracted from --verbose output
and this works fine without giving me any errors at all.

Also on a "hello world!" program I tried to link using a modified
script where I put 
     . = 0x120000000 + SIZEOF_HEADERS + 0x100;
with "0x100" is some bogus number just to move a section start
ahead.  When linking with '-M --verbose' I see, among other things,

GNU ld version 2.10.90 (with BFD 2.10.0.9)
.....

Linker script and memory map
          0x0000000120000290      .=((0x120000000+SIZEOF_HEADERS)+0x100)
.....

so, obviously, this is my modified script which is used.  Moreover
an executable linked that way still prints "hello world!".

   Best regards,
   Michal
   michal@harddata.com


More information about the Binutils mailing list