mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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>
This commit is contained in:
@@ -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); \
|
||||
|
Reference in New Issue
Block a user