diff options
Diffstat (limited to 'include/link.h')
-rw-r--r-- | include/link.h | 117 |
1 files changed, 2 insertions, 115 deletions
diff --git a/include/link.h b/include/link.h index 070eabb6d..4680dd914 100644 --- a/include/link.h +++ b/include/link.h @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000 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 @@ -75,40 +75,11 @@ extern struct r_debug _r_debug; */ extern ElfW(Dyn) _DYNAMIC[]; - -/* Some internal data structures of the dynamic linker used in the - linker map. We only provide forward declarations. */ -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. These data structures exist in space used by the run-time dynamic linker; - modifying them may have disastrous results. - - This data structure might change in future, if necessary. User-level - programs must avoid defining objects of this type. */ + modifying them may have disastrous results. */ struct link_map { @@ -119,90 +90,6 @@ struct link_map char *l_name; /* Absolute file name object was found in. */ ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */ struct link_map *l_next, *l_prev; /* Chain of loaded objects. */ - - /* All following members are internal to the dynamic linker. - They may change without notice. */ - - struct libname_list *l_libname; - /* Indexed pointers to dynamic section. - [0,DT_NUM) are indexed by the processor-independent tags. - [DT_NUM,DT_NUM+DT_PROCNUM) are indexed by the tag minus DT_LOPROC. - [DT_NUM+DT_PROCNUM,DT_NUM+DT_PROCNUM+DT_EXTRANUM) are indexed - by DT_EXTRATAGIDX(tagvalue) and - [DT_NUM+DT_PROCNUM+DT_VERSIONTAGNUM, - DT_NUM+DT_PROCNUM+DT_VERSIONTAGNUM+DT_EXTRANUM) - are indexed by DT_EXTRATAGIDX(tagvalue) (see <elf.h>). */ - - ElfW(Dyn) *l_info[DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM]; - const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */ - ElfW(Addr) l_entry; /* Entry point location. */ - ElfW(Half) l_phnum; /* Number of program header entries. */ - - /* Array of DT_NEEDED dependencies and their dependencies, in - 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 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; - - /* Symbol hash table. */ - ElfW(Symndx) l_nbuckets; - const ElfW(Symndx) *l_buckets, *l_chain; - - unsigned int l_opencount; /* Reference count for dlopen/dlclose. */ - enum /* Where this object came from. */ - { - lt_executable, /* The main executable program. */ - lt_library, /* Library needed by main executable. */ - lt_loaded /* Extra run-time loaded shared object. */ - } l_type:2; - unsigned int l_relocated:1; /* Nonzero if object's relocations done. */ - unsigned int l_init_called:1; /* Nonzero if DT_INIT function called. */ - unsigned int l_init_running:1; /* Nonzero while DT_INIT function runs. */ - unsigned int l_global:1; /* Nonzero if object in _dl_global_scope. */ - unsigned int l_reserved:2; /* Reserved for internal use. */ - - /* Array with version names. */ - unsigned int l_nversions; - struct r_found_version *l_versions; - - /* Collected information about own RPATH directories. */ - struct r_search_path_elem **l_rpath_dirs; - - /* Collected results of relocation while profiling. */ - ElfW(Addr) *l_reloc_result; - - /* Pointer to the version information if available. */ - ElfW(Half) *l_versyms; - - /* String specifying the path where this object was found. */ - const char *l_origin; - - /* 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]; - - /* This information is kept to check for sure whether a shared - object is the same as one already loaded. */ - dev_t l_dev; - ino_t l_ino; - - /* Nonzero if the data structure pointed to by `l_phdr' is allocated. */ - int l_phdr_allocated; }; #endif /* link.h */ |