This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How should STB_GNU_UNIQUE binding interact with RTLD_LOCAL ?


Greetings,

We've just switched to gcc-4.6 toolchain, and discovered an obscure set
of bugs, which are triggered by STB_GNU_UNIQUE symbols.

Effectively, STB_GNU_UNIQUE symbols always get installed in the global
scope, even when a library is loaded via dlopen(..., RTLD_LOCAL), making
it impossible to load two separate libraries sharing the same STB_GNU_UNIQUE
symbols and have them not interfere with each other.

That behavior appears counter-intuitive and contradicts the description
of RTLD_LOCAL:

   This is the converse of RTLD_GLOBAL, and the default if neither flag
   is specified.  Symbols defined in this library are not made available
   to resolve references in subsequently loaded libraries.

Is this really how it is supposed to work, or should RTLD_LOCAL "override"
STB_GNU_UNIQUE and keep them local?

Thanks,
-- 
Paul Pluzhnikov


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