diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-09-18 19:20:56 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-09-18 19:20:56 +0000 |
commit | b90395e6e9479e06ada7294044aaa150a094150f (patch) | |
tree | b743ab6c481685f996e700bf24dca01e61258731 /sysdeps | |
parent | 874aa52349cc111d1f6ea5dff24bb14c306714e0 (diff) | |
download | glibc-b90395e6e9479e06ada7294044aaa150a094150f.tar.gz glibc-b90395e6e9479e06ada7294044aaa150a094150f.tar.xz glibc-b90395e6e9479e06ada7294044aaa150a094150f.zip |
* sysdeps/generic/ldsodefs.h (DL_LOOKUP_GSCOPE_LOCK): New definition.
* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Or in DL_LOOKUP_GSCOPE_LOCK into flags after THREAD_GSCOPE_SET_FLAG (). * elf/dl-sym.c (do_sym): Likewise. * include/link.h (struct link_map): Add l_serial field. * elf/dl-object.c (_dl_new_object): Initialize l_serial. * elf/dl-lookup.c (add_dependency): Add flags argument. Remember map->l_serial, if DL_LOOKUP_GSCOPE_LOCK is among flags, use THREAD_GSCOPE_RESET_FLAG before and THREAD_GSCOPE_SET_FLAG after __rtld_lock_lock_recursive (GL(dl_load_lock)) to avoid deadlock. Don't dereference map until it has been found on some list. If map->l_serial changed, return -1.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index aefd105f0a..147bffb96f 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -845,7 +845,9 @@ enum DL_LOOKUP_ADD_DEPENDENCY = 1, /* Return most recent version instead of default version for unversioned lookup. */ - DL_LOOKUP_RETURN_NEWEST = 2 + DL_LOOKUP_RETURN_NEWEST = 2, + /* Set if dl_lookup* called with GSCOPE lock held. */ + DL_LOOKUP_GSCOPE_LOCK = 4, }; /* Lookup versioned symbol. */ |