This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: Undefined symbol in dynamic library libstdc++.so.3.0.0


> What is the link line to produce the shared object?  It better uses
> gcc (and not ld dircetly) since instead of using crtbegin the linker
> has to use crtbeginS.  This is where the symbol is defined.

My guess is that it is the infamous .hidden conflict, where the
binutils snapshot implements .hidden by putting a STB_LOCAL symbol in
the dynamic symbol table (namely __dso_handle). The dynamic linker
fails to find this symbol in the shared library, because it does not
consider STB_LOCAL symbols.

The work-around is to not define HAVE_GAS_HIDDEN in auto-host.h, and
recompile the compiler. I'm not sure what the solution is. Perhaps
somebody should sit down and implement .hidden in the same way as
local symbols in the symbol versioning feature. Perhaps that someone
should be me, but I haven't started, yet.

In any case, I very much doubt that this is a libstdc++ problem; it is
rather a bug in binutils, glibc, the compiler, or the C++ ABI (in that
order :-).

Regards,
Martin

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