Subject: dlopening a c++ DSO with EH [was Re: Xerces-P link problems]
To: Emmanuel Dreyfus <firstname.lastname@example.org>
From: Nick Hudson <email@example.com>
Date: 04/03/2001 08:39:54
Emmanuel Dreyfus wrote:
[moved to tech-toolchain]
> > Use -export-dynamic when linking the perl executable.
> I can't get this to work:
> gcc -L/usr/pkg/lib -Wl,-export-dynamic -Wl,-E -Wl,-R/usr/pkg/lib -o
> perl perlmain.o lib/auto/DynaLoader/DynaLoader.a libperl.a `cat
> ext.libs` -lm -lcrypt
> perl still does not contain the __eh_alloc symbol. Any idea why?
This will be because perl is a c binary and __eh_alloc is for exception
handling in c++. Adding -fexceptions should help us on the way, but then
the linker won't add in the necessary stuff from -lgcc because its not
One solution would be to use -Wl,-whole-archive for libgcc.a - maybe.
The real solution is still a mistery to me... gcc 3.0 apparently will
come with libgcc.so which should be linked into the DSO. This is still a
Maybe Todd, if he's not too busy, has other ideas for the up and coming
toolchain upgrade that he can share.
aka firstname.lastname@example.org, email@example.com