aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-dst.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-12-20 15:52:57 +0100
committerFlorian Weimer <fweimer@redhat.com>2024-12-20 15:52:57 +0100
commit2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5 (patch)
tree0036fd9611c8a9cda941c72ef80d16201380e24d /elf/dl-dst.h
parent322e9d4e443084336ea41a8e7bf72456ab273b73 (diff)
downloadglibc-2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5.zip
glibc-2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5.tar.gz
glibc-2b1dba3eb364aa65ce4ee947c39fb8d2d75e69b5.tar.bz2
elf: Introduce is_rtld_link_map
Unconditionally define it to false for static builds. This avoids the awkward use of weak_extern for _dl_rtld_map in checks that cannot be possibly true on static builds. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/dl-dst.h')
-rw-r--r--elf/dl-dst.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/elf/dl-dst.h b/elf/dl-dst.h
index 07100e5..bff3685 100644
--- a/elf/dl-dst.h
+++ b/elf/dl-dst.h
@@ -18,11 +18,6 @@
#include "trusted-dirs.h"
-#ifdef SHARED
-# define IS_RTLD(l) (l) == &GL(dl_rtld_map)
-#else
-# define IS_RTLD(l) 0
-#endif
/* Guess from the number of DSTs the length of the result string. */
#define DL_DST_REQUIRED(l, name, len, cnt) \
({ \
@@ -44,7 +39,7 @@
auditing, in ld.so. */ \
if ((l)->l_origin == NULL) \
{ \
- assert ((l)->l_name[0] == '\0' || IS_RTLD (l)); \
+ assert ((l)->l_name[0] == '\0' || is_rtld_link_map (l)); \
(l)->l_origin = _dl_get_origin (); \
dst_len = ((l)->l_origin && (l)->l_origin != (char *) -1 \
? strlen ((l)->l_origin) : 0); \