This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --export-dynamic question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]