[BUG] ld behavior varies for C++ static initializer depending on .a or .o input
Alexandre Oliva
aoliva@redhat.com
Fri Apr 11 04:47:00 GMT 2003
On Apr 11, 2003, Hal Black <hablack@vt.edu> wrote:
> But when linking .a files composed
> of those .o files, static initializers are not called.
And, if you look closer, you'll notice the object files that contain
the initializers aren't linked in at all. Which is perfectly fine,
given that no symbols from it are referenced. Maybe you want
--whole-archive?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
More information about the Binutils
mailing list