On 06/07/2011 08:07 PM, Michael Poole wrote:
Some of the files in my convenience libraries have static
initializers. By default, the linker discards these symbols because
they are not referenced. I am trying to figure out how to keep them
in an automake-driven build.
Mailing list threads I have seen on the Internet, plus the "libtool"
script code (as of version 2.2.6b), indicate that convenience
libraries should be linked with -Wl,--whole-archive (or the
equivalent). I do not see that here.
Yes, when convenience libraries are used to create a shared library, all
the objects are included in the output, when the output is an
application they are used like a normal archive library.
Either use them to create a shared library or, if creating an
application, don't use them, use the objects instead.
Peter
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool