------- Comment #14 from jakub at gcc dot gnu dot org 2010-01-29 07:52 ------- Clearly this works with icc, because library.so isn't linked against libstdc++.so. I guess if you link the library with gcc instead of g++, it will work too. Any reason why you need to use RTLD_DEEPBIND? AFAIK it has been mainly to support libraries linked against a different version of libstdc++ from the rest of the app (say the program and all its libraries linked against GCC 3.2/3.3 libstdc++, while some library it dlopens linked against GCC 3.4+ libstdc++. I'd say there is nothing that should be done on the libstdc++ side, this can happen with any kinds of symbols in any library. What can help is compile the program with -fpic/-fPIC, then it won't have copy relocation and thus this problem won't exist.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42679