This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: --export-dynamic question
- From: Andreas Schwab <schwab at suse dot de>
- To: Toon Knapen <toon dot knapen at fft dot be>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 31 Aug 2004 14:09:02 +0200
- Subject: Re: --export-dynamic question
- References: <413466E6.8030407@fft.be>
Toon Knapen <toon.knapen@fft.be> writes:
> Now however I link a.out using following command-line:
>
> ld --export-dynamic main.o libfoo.a
>
> And the funtion foo does not appear either (although I would expect the
> export-dynamic flag to prevent the dead-code elimination) ?
--export-dynamic does not change in any way how the linker collects input
files. Since libfoo.a(foo.o) is not linked in you also don't get any
symbols defined in that file. If you want to force linking in the whole
archive library use --whole-archive.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."