Shridhar Daithankar wrote:
I am getting failure on dlopen with dlerror message as 'undefined symbol: __dso_handle'. Following is my system configuration on top of MDK 9.0 These are upgraded packages from cooker today. Besides I have binutils 2.13.1 installed from sources which appear first in path(/usr/local/bin)

[shridhar@daithan shridhar]$ rpm -qa |grep -i glibc
glibc-devel-2.2.5-19mdk
glibc-2.2.5-19mdk
[shridhar@daithan shridhar]$ rpm -qa |grep -i gcc
gcc-cpp-3.2-3mdk
gcc-3.2-3mdk
libgcc1-3.2-3mdk
gcc-c++-3.2-3mdk
[shridhar@daithan shridhar]$ rpm -qa |grep -i binutils
binutils-2.12.90.0.15-4mdk
libbinutils2-2.12.90.0.15-4mdk
[shridhar@daithan shridhar]$

I have found that this is something to do with .hidden directive and linker/assembler. Only thing I have not done is compiling gcc by hand.

Has anybody else experienced this problem? Any solution? Code used to work fine on MDK 8.2. Besides I do not get this failure for all libraries. Some simple libraries gets loaded but C++ libraries have some problems. Though that's may not be the exact pattern for errors. Just an observation..

Yes! I got the same problems yesterday (both on 9.0 and latest Cooker). I have not recompiled any binutils/gcc/glibc.

The problem is that crtbegin{,S,T}.o, which define __dso_handle, are not being included in the library.

I found that removing -nostdlib from my library link options solved the problem (not fully tested them so there may be other gremlims lurking from removal of -nostdlib).

On some libraries I could get away with just removing an unnecessary inclusion of <iostream> from the source, removing the need for the library to want __dso_handle. This might be why the simple libraries load.

--
Mark Scott




Reply via email to