1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Implement STB_GNU_UNIQUE handling.

Some symbols have to be identified process-wide by their name.  This is
particularly important for some C++ features (e.g., class local static data
and static variables in inline functions).  This cannot completely be
implemented with ELF functionality so far.  The STB_GNU_UNIQUE binding
helps by ensuring the dynamic linker will always use the same definition for
all symbols with the same name and this binding.
This commit is contained in:
Ulrich Drepper
2009-07-09 23:52:22 -07:00
parent b4f55afd03
commit 415ac3df9b
16 changed files with 375 additions and 12 deletions

View File

@ -569,7 +569,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
if (GL(dl_ns)[nsid]._ns_loaded == NULL)
break;
if (nsid == DL_NNS)
if (__builtin_expect (nsid == DL_NNS, 0))
{
/* No more namespace available. */
__rtld_lock_unlock_recursive (GL(dl_load_lock));
@ -579,7 +579,10 @@ no more namespaces available for dlmopen()"));
}
if (nsid == GL(dl_nns))
++GL(dl_nns);
{
__rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
++GL(dl_nns);
}
_dl_debug_initialize (0, nsid)->r_state = RT_CONSISTENT;
}