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: __dso_handle


On Fri, 16 Jun 2000, Brian Chamberlain wrote:

> I installed egcs-20000612 with libstdc++-v3.
> The first c++ program I tried compiled just fine but when 
> I tried to run it I got the following error message:
> 
> error in loading shared libraries: /usr/lib/libstdc++.so.3:
> undefined symbol: __dso_handle
> 
> Does anyone know what could cause this?
> 
> Thanks

I quote Martin v. Loewis (April 18 of this year), who helped me out when I
had the same problem. His analysis:

*********************
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.
*********************

Commenting out the line

#define HAVE_GAS_HIDDEN 1

in ($builddir)/gcc/auto-host.h after configuring, but before building, the
compiler does the trick.

I wish someone would fix this! I sometimes forget when (re)building the
compiler, and then I get stuck having to go through another half-hour of
compilation after commenting out that line.

Regards, Russell.

Russell Davidson                    email: russell@ehess.cnrs-mrs.fr
GREQAM,
Centre de la Vieille Charite,       telephone: +33-4.91.14.07.40 
F-13002 Marseille                   fax:       +33-4.91.90.02.27


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