aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile2
-rw-r--r--elf/rtld.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 595a0a7f39..4ff6f89b64 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -250,6 +250,8 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' -D'SLIBDIR="$(slibdi
CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
CFLAGS-cache.c = $(SYSCONF-FLAGS)
+CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-D_RTLD_LOCAL)
+
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
generated += $(addsuffix .so,$(strip $(modules-names)))
diff --git a/elf/rtld.c b/elf/rtld.c
index b926271590..12b3cc557b 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -91,11 +91,7 @@ struct rtld_global _rtld_global =
._dl_hwcap_mask = HWCAP_IMPORTANT,
._dl_load_lock = _LIBC_LOCK_RECURSIVE_INITIALIZER
};
-/* There must only be the definition in ld.so itself. */
-#ifdef HAVE_PROTECTED
-asm (".protected _rtld_global");
-#endif
-
+strong_alias (_rtld_global, _rtld_local);
static void dl_main (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
ElfW(Addr) *user_entry);