From 4e35ef2c710dfefe96a491d133b5a53414e9a5c2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Jan 2007 20:48:56 +0000 Subject: * sysdeps/generic/ldsodefs.h: Define DL_LOOKUP_SCOPE_LOCK. * elf/dl-lookup.c (add_dependency): If scope map is locked, unlock it before getting dl_load_lock and then relock. (_dl_lookup_symbol_x): Pass flags to add_dependency. When rerunning _dl_lookup_symbol_x, compute symbol_scope again in case we unlocked the scope. * elf/dl-runtime.c (_dl_fixup): Pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x in case we locked the scope. (_dl_profile_fixup): Likewise. * elf/dl-sym.c (do_sym): In flags passed to call_dl_lookup, also set DL_LOOKUP_SCOPE_LOCK. --- sysdeps/generic/ldsodefs.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sysdeps/generic/ldsodefs.h') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index dda91bb806..a9d20b2150 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -838,7 +838,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 the scopr lock in the UNDEF_MAP is taken. */ + DL_LOOKUP_SCOPE_LOCK = 4 }; /* Lookup versioned symbol. */ @@ -847,7 +849,7 @@ extern lookup_t _dl_lookup_symbol_x (const char *undef, const ElfW(Sym) **sym, struct r_scope_elem *symbol_scope[], const struct r_found_version *version, - int type_class, int explicit, + int type_class, int flags, struct link_map *skip_map) internal_function attribute_hidden; -- cgit v1.2.3-70-g09d2