summaryrefslogtreecommitdiff
path: root/elf/link.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-06 09:16:53 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-06 09:16:53 +0000
commitbe93561004695198611aa8707f10250f780988b2 (patch)
tree7b9a502d849b761d966114b855a1fa9de4022e90 /elf/link.h
parent9eb71e60ef889158238c3066c75b65336d846684 (diff)
Update.
1998-09-06 09:00 Ulrich Drepper <drepper@cygnus.com> * version.h (VERSION): Bump to 2.0.96. Rewrite runtime linker to be truly thread-safe. There is now no global variable specifying the scope. We create all needed scopes at the time the link maps are created. * elf/Versions [GLIBC_2.1]: Add _dl_loaded and _dl_main_searchlist. * elf/link.h: Add struct r_scope_elem and use this for l_searchlist, l_symbolic_searchlist, l_scope, and l_local_scope elements in struct link_map. * elf/dl-close.c: Rewritten accordingly. * elf/dl-deps.c: Likewise. * elf/dl-error.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-object.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-symbol.c: Likewise. * elf/dl-version.c: Likewise. * elf/dlfcn.h: Likewise. * elf/dlsym.c: Likewise. * elf/dlvsym.c: Likewise. * elf/ldsodefs.h: Likewise. * elf/rtld.c: Likewise. * iconv/gconv_dl.c: Likewise. * nss/nsswitch.c: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.
Diffstat (limited to 'elf/link.h')
-rw-r--r--elf/link.h41
1 files changed, 33 insertions, 8 deletions
diff --git a/elf/link.h b/elf/link.h
index e31dd2dd65..ecf0469b7a 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -80,6 +80,24 @@ struct libname_list;
struct r_found_version;
struct r_search_path_elem;
+/* Forward declaration. */
+struct link_map;
+
+/* Structure to describe a single list of scope elements. The lookup
+ functions get passed an array of pointers to such structures. */
+struct r_scope_elem
+{
+ /* Array of maps for the scope. */
+ struct link_map **r_list;
+ /* Number of entries in the scope. */
+ unsigned int r_nlist;
+
+ /* Array of maps which also includes duplicates. */
+ struct link_map **r_duplist;
+ /* Number of elements in this list. */
+ unsigned int r_nduplist;
+};
+
/* Structure describing a loaded shared object. The `l_next' and `l_prev'
members form a chain of all the shared objects loaded at startup.
@@ -119,15 +137,14 @@ struct link_map
ElfW(Half) l_phnum; /* Number of program header entries. */
/* Array of DT_NEEDED dependencies and their dependencies, in
- dependency order for symbol lookup. This is null before the
- dependencies have been loaded. */
- struct link_map **l_searchlist;
- unsigned int l_nsearchlist;
+ dependency order for symbol lookup (with and without
+ duplicates). There is no entry before the dependencies have
+ been loaded. */
+ struct r_scope_elem l_searchlist;
- /* We keep another list in which we keep duplicates. This is
- needed in _dl_lookup_symbol_skip to implemented RTLD_NEXT. */
- struct link_map **l_dupsearchlist;
- unsigned int l_ndupsearchlist;
+ /* We need a special searchlist to process objects marked with
+ DT_SYMBOLIC. */
+ struct r_scope_elem l_symbolic_searchlist;
/* Dependent object that first caused this object to be loaded. */
struct link_map *l_loader;
@@ -168,6 +185,14 @@ struct link_map
/* Start and finish of memory map for this object. l_map_start
need not be the same as l_addr. */
ElfW(Addr) l_map_start, l_map_end;
+
+ /* This is an array defining the lookup scope for this link map.
+ There are at most three different scope lists. */
+ struct r_scope_elem *l_scope[4];
+
+ /* A similar array, this time only with the local scope. This is
+ used occasionally. */
+ struct r_scope_elem *l_local_scope[2];
};
#endif /* link.h */