aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
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 /sysdeps/generic
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 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index b1af7fde0a..1e1bb4ccd4 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -383,6 +383,21 @@ struct rtld_global
allocated by rtld. Later it keeps the size of the map. It might be
reset if in _dl_close if the last global object is removed. */
size_t _ns_global_scope_alloc;
+ /* Search table for unique objects. */
+ struct unique_sym_table
+ {
+ __rtld_lock_recursive_t lock;
+ struct unique_sym
+ {
+ uint32_t hashval;
+ const char *name;
+ const ElfW(Sym) *sym;
+ const struct link_map *map;
+ } *entries;
+ size_t size;
+ size_t n_elements;
+ void (*free) (void *);
+ } _ns_unique_sym_table;
/* Keep track of changes to each namespace' list. */
struct r_debug _ns_debug;
} _dl_ns[DL_NNS];