This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: deeper understanding of ld
- From: Andreas Schwab <schwab at suse dot de>
- To: binutils at sources dot redhat dot com
- Date: Sun, 19 May 2002 17:22:46 +0200
- Subject: Re: deeper understanding of ld
- References: <20020519085939.GA9207@C-System.brain.net>
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."