--export-dynamic question
Paul Brook
paul@codesourcery.com
Tue Aug 31 12:07:00 GMT 2004
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
More information about the Binutils
mailing list