This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re[4]: ld: Not enough room for program headers
- To: michal at ellpspace dot math dot ualberta dot ca
- Subject: Re[4]: ld: Not enough room for program headers
- From: Franco Broi <franco at robres dot com dot au>
- Date: Wed, 27 Sep 2000 14:19:43 +0800 (WST)
- Cc: franco at robres dot com dot au, nickc at redhat dot com, hjl at lucon dot org, binutils at sourceware dot cygnus dot com
Now I know to use the -T option (although it does say in the manual that
this is equivalent to the -c option) I've tried changing the script
as you did by adding 0x100 but this produced the same error. I then swapped
SIZEOF_HEADERS for 1024 and it worked.
Where do we go from here?
Franco.
Michal Jaegermann <michal@ellpspace.math.ualberta.ca> wrote:
> 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