deeper understanding of ld
Andreas Schwab
schwab@suse.de
Sun May 19 08:22:00 GMT 2002
Ingo Krabbe <i.krabbe@dokom.net> writes:
|> Hi,
|>
|> I think I need to go deeper into gnu-ld... That's my problem:
|>
|> When I compile an XServer from scratch with make World everything goes
|> fine until I try to start it.
|>
|> Newer versions of XFree are shipped with modules linked by
|>
|> ld -r -o module.o foo.o bar.o ...
|>
|> When the XFree86 program tries to load these modules it gets errors like
|>
|> Not loading .rodata.str1.1
|> Not loading .rodata.str1.32
|> Not loading .rodata.cst4
|> ... more following
|>
|> resulting finally in unresolved symbols concerning the module object.
This is a bug in the ELF loader of XFree86 (patch available on request).
It is looking at the section's name to decide whether to load it, and
misses a whole lot of new cases. This ELF loader is a big horrible mess
that should be rewritten from scratch. Interestingly enough, the Linux
modutils have a very clean implementation of the same thing which did not
need any bit of changes due to the new merge/string sections feature.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Binutils
mailing list