diff options
| author | Florian Weimer <fweimer@redhat.com> | 2024-12-20 15:52:57 +0100 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2024-12-20 15:52:57 +0100 |
| commit | ef5823d955dd7e6b4ffed9f3a8455d131cd7a737 (patch) | |
| tree | ef5978beb916b125b6a1f92d6a4980e3fa1bb099 /sysdeps/generic | |
| parent | 2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5 (diff) | |
| download | glibc-ef5823d955dd7e6b4ffed9f3a8455d131cd7a737.tar.xz glibc-ef5823d955dd7e6b4ffed9f3a8455d131cd7a737.zip | |
elf: Move _dl_rtld_map, _dl_rtld_audit_state out of GL
This avoids immediate GLIBC_PRIVATE ABI issues if the size of
struct link_map or struct auditstate changes.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/generic')
| -rw-r--r-- | sysdeps/generic/ldsodefs.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 2c25c8db46..cec56e2214 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -392,14 +392,6 @@ struct rtld_global /* List of search directories. */ EXTERN struct r_search_path_elem *_dl_all_dirs; - /* Structure describing the dynamic linker itself. */ - EXTERN struct link_map _dl_rtld_map; -#ifdef SHARED - /* Used to store the audit information for the link map of the - dynamic loader. */ - struct auditstate _dl_rtld_auditstate[DL_NNS]; -#endif - /* Get architecture specific definitions. */ #define PROCINFO_DECL #ifndef PROCINFO_CLASS @@ -1323,11 +1315,18 @@ rtld_active (void) return GLRO(dl_init_all_dirs) != NULL; } +/* Pre-allocated link map for the dynamic linker itself. */ +extern struct link_map _dl_rtld_map attribute_hidden; + +/* Used to store the audit information for the link map of the + dynamic loader. */ +extern struct auditstate _dl_rtld_auditstate[DL_NNS] attribute_hidden; + /* Returns true of L is the link map of the dynamic linker itself. */ static inline bool is_rtld_link_map (const struct link_map *l) { - return l == &GL(dl_rtld_map); + return l == &_dl_rtld_map; } static inline struct auditstate * @@ -1335,7 +1334,7 @@ link_map_audit_state (struct link_map *l, size_t index) { if (is_rtld_link_map (l)) /* The auditstate array is stored separately. */ - return &GL (dl_rtld_auditstate) [index]; + return _dl_rtld_auditstate + index; else { /* The auditstate array follows the link map in memory. */ |
