http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42679



Yogesh Gaur <gauryogesh.nsit at gmail dot com> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |gauryogesh.nsit at gmail

                   |                            |dot com



--- Comment #20 from Yogesh Gaur <gauryogesh.nsit at gmail dot com> 2013-01-02 
01:41:19 UTC ---

Hello Jakub and Jason,



Did we get any solution for this reported bugzilla.



Actually I also have faced similar issue while loading my library using dlopen

by passing RTLD_DEEPBIND flag.



When I didn't pass this flag, no issues occurs and program run fine.



I am using glibc-2.14.

output with LD_DEBUG=all for both (crash and working) case : 



==================================================================

WITH RTLD_DEEPBIND flag

Linux#> LD_DEBUG=all ./main_db 2>&1 | grep _ZSt4cerr

       424:     symbol=_ZSt4cerr;  lookup in file=./main_db [0]

       424:     binding file /lib/libstdc++.so.6 [0] to ./main_db [0]: normal

symbol `_ZSt4cerr' [GLIBCXX_3.4]

       424:     symbol=_ZSt4cerr;  lookup in file=/lib/libdl.so.2 [0]

       424:     symbol=_ZSt4cerr;  lookup in file=/lib/libstdc++.so.6 [0]

       424:     binding file ./main_db [0] to /lib/libstdc++.so.6 [0]: normal

symbol `_ZSt4cerr' [GLIBCXX_3.4]

       424:     symbol=_ZSt4cerr;  lookup in file=./library.so [0]

       424:     symbol=_ZSt4cerr;  lookup in file=/lib/libstdc++.so.6 [0]

       424:     binding file ./library.so [0] to /lib/libstdc++.so.6 [0]:

normal symbol `_ZSt4cerr' [GLIBCXX_3.4] //--> This is problematic scenario here

as binding of this symbol is done with libstdc++.so.6



==================================================================

WITHOUT RTLD_DEEPBIND flag

Linux#> LD_DEBUG=all ./main_ndb 2>&1 | grep _ZSt4cerr

       427:     symbol=_ZSt4cerr;  lookup in file=./main_ndb [0]

       427:     binding file /lib/libstdc++.so.6 [0] to ./main_ndb [0]: normal

symbol `_ZSt4cerr' [GLIBCXX_3.4]

       427:     symbol=_ZSt4cerr;  lookup in file=/lib/libdl.so.2 [0]

       427:     symbol=_ZSt4cerr;  lookup in file=/lib/libstdc++.so.6 [0]

       427:     binding file ./main_ndb [0] to /lib/libstdc++.so.6 [0]: normal

symbol `_ZSt4cerr' [GLIBCXX_3.4]

       427:     symbol=_ZSt4cerr;  lookup in file=./main_ndb [0]

       427:     binding file ./library.so [0] to ./main_ndb [0]: normal symbol

`_ZSt4cerr' [GLIBCXX_3.4] // --> Here proper binding happen and binding of

library.so is done with main_ndb executable.

==================================================================



Please let me know if there is any solution for this long reported issue. I

need to use RTLD_DEEPBIND flag.

Reply via email to