aboutsummaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-07-09 23:52:22 -0700
committerUlrich Drepper <drepper@redhat.com>2009-07-09 23:52:22 -0700
commit415ac3df9b10ae426d4f71f9d48003f6a3c7bd8d (patch)
treeffdd1aed425688539db80ff7b9daf6f6ddbcbfff /elf/rtld.c
parentb4f55afd031f14531ba7681032fc5f75a1578320 (diff)
downloadglibc-415ac3df9b10ae426d4f71f9d48003f6a3c7bd8d.tar
glibc-415ac3df9b10ae426d4f71f9d48003f6a3c7bd8d.tar.gz
glibc-415ac3df9b10ae426d4f71f9d48003f6a3c7bd8d.tar.bz2
glibc-415ac3df9b10ae426d4f71f9d48003f6a3c7bd8d.zip
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.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index f97de9ac08..55b84c3bf4 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -127,7 +127,12 @@ struct rtld_global _rtld_global =
#ifdef _LIBC_REENTRANT
._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER,
#endif
- ._dl_nns = 1
+ ._dl_nns = 1,
+ ._dl_ns =
+ {
+ [LM_ID_BASE] = { ._ns_unique_sym_table
+ = { .lock = _RTLD_LOCK_RECURSIVE_INITIALIZER } }
+ }
};
/* If we would use strong_alias here the compiler would see a
non-hidden definition. This would undo the effect of the previous