This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: --export-dynamic question
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sources dot redhat dot com
- Cc: Toon Knapen <toon dot knapen at fft dot be>
- Date: Tue, 31 Aug 2004 13:07:15 +0100
- Subject: Re: --export-dynamic question
- Organization: CodeSourcery
- References: <413466E6.8030407@fft.be>
On Tuesday 31 August 2004 12:54, Toon Knapen wrote:
> ar ru libfoo.a foo.o
> ld main.o libfoo.a
>
> Now the function foo does not appear anymore when I 'nm a.out' (as
> expected since it is dead code)
>
> 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) ?
Try --whole-archive.
Paul