diff options
author | Florian Weimer <fweimer@redhat.com> | 2025-02-02 20:10:08 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2025-02-02 20:10:08 +0100 |
commit | aa1bf8903992cc0d26cacb9e5930a9fed8f50548 (patch) | |
tree | 598d102d7d8a2687ccc3981c3150764440a8faf0 /sysdeps/generic | |
parent | a7aad6e2b774f24934d8925d3169ee6bf9d7538c (diff) | |
download | glibc-aa1bf8903992cc0d26cacb9e5930a9fed8f50548.zip glibc-aa1bf8903992cc0d26cacb9e5930a9fed8f50548.tar.gz glibc-aa1bf8903992cc0d26cacb9e5930a9fed8f50548.tar.bz2 |
elf: Split _dl_lookup_map, _dl_map_new_object from _dl_map_object
So that they can eventually be called separately from dlopen.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index e871f27..6b4ed3d 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -885,6 +885,11 @@ int _dl_catch_exception (struct dl_exception *exception, void (*operate) (void *), void *args); rtld_hidden_proto (_dl_catch_exception) +/* Search NSID for a map with NAME. If no such map is already loaded, + return NULL. */ +struct link_map *_dl_lookup_map (Lmid_t nsid, const char *name) + attribute_hidden; + /* Open the shared object NAME and map in its segments. LOADER's DT_RPATH is used in searching for NAME. If the object is already opened, returns its existing map. */ @@ -893,6 +898,14 @@ extern struct link_map *_dl_map_object (struct link_map *loader, int type, int trace_mode, int mode, Lmid_t nsid) attribute_hidden; +/* Like _dl_map_object, but assumes that NAME has not been loaded yet + (_dl_lookup_map returned NULL). */ +struct link_map *_dl_map_new_object (struct link_map *loader, + const char *name, + int type, int trace_mode, int mode, + Lmid_t nsid) attribute_hidden; + + /* Call _dl_map_object on the dependencies of MAP, and set up MAP->l_searchlist. PRELOADS points to a vector of NPRELOADS previously loaded objects that will be inserted into MAP->l_searchlist after MAP |