AW: GNU ld fails to link solaris values-Xa.o
Nick Clifton
nickc@redhat.com
Wed Oct 23 03:47:00 GMT 2002
Hi Rüdiger,
> RE: the other error message:
> Not enough room for program headers (allocated 2, need 3)
>
> I have change the file
> /usr/local/i386-pc-solaris2.5.1/lib/ldscripts/elf_i386.x
>
> orig: . = 0x08048000 + SIZEOF_HEADERS;
> new: . = 0x08048000 + 1024;
>
> and use the command line switch: -melf_i386
>
> Is this the right way to do it?
If it works, then it is right :-).
> PS: Building the cross compiler for the solrais 2.5.1 i386 target
> runs into this linking problem. At this stage the ld is started
> from xgcc, so I don't know how to modify the cross compiler building
> enviroment to get the command line switches.
You can use the "-Wl,<linker_command_line_switch>" syntax to add
linker switches to xgcc's command line. Note - you need to include
the single or double dashes of the linker command line switch in the
above, so if you wanted to pass --verbose switch on to the linker you
would use: -Wl,--verbose.
Cheers
Nick
More information about the Binutils
mailing list