about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile14
-rw-r--r--elf/dl-load.c5
-rw-r--r--elf/rtld.c3
3 files changed, 8 insertions, 14 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 06e376d803..afebaec1ec 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -159,8 +159,8 @@ endif
 ifeq (yes,$(build-shared))
 tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
 	 constload1 order $(tests-vis-$(have-protected)) noload filter unload \
-	 reldep reldep2 reldep3 reldep4 $(tests-nodelete-$(have-z-nodelete)) \
-	 $(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \
+	 reldep reldep2 reldep3 reldep4 nodelete nodelete2 \
+	 nodlopen nodlopen2 neededtest neededtest2 \
 	 neededtest3 neededtest4 unload2 lateglobal initfirst global \
 	 restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
 	 circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
@@ -175,8 +175,6 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
 #	 reldep9
 test-srcs = tst-pathopt
 tests-vis-yes = vismain
-tests-nodelete-yes = nodelete nodelete2
-tests-nodlopen-yes = nodlopen nodlopen2
 tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
 endif
 ifeq (yesyes,$(have-fpie)$(build-shared))
@@ -186,8 +184,9 @@ tests: $(objpfx)tst-leaks1-mem
 modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		testobj1_1 failobj constload2 constload3 unloadmod \
 		dep1 dep2 dep3 dep4 $(modules-vis-$(have-protected)) \
-		$(modules-nodelete-$(have-z-nodelete)) \
-		$(modules-nodlopen-$(have-z-nodlopen)) filtmod1 filtmod2 \
+		nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
+		nodel2mod1 nodel2mod2 nodel2mod3 \
+		nodlopenmod nodlopenmod2 filtmod1 filtmod2 \
 		reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \
 		reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \
 		neededobj1 neededobj2 neededobj3 neededobj4 \
@@ -221,9 +220,6 @@ ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
 endif
 modules-vis-yes = vismod1 vismod2 vismod3
-modules-nodelete-yes = nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
-		       nodel2mod1 nodel2mod2 nodel2mod3
-modules-nodlopen-yes = nodlopenmod nodlopenmod2
 modules-execstack-yes = tst-execstack-mod
 extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
 # We need this variable to be sure the test modules get the right CPPFLAGS.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 2adeb60fcd..ccbbf4fdd2 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1392,7 +1392,7 @@ cannot allocate TLS data structures for initial thread");
 	 requires that it be executable.  We must change the
 	 protection of the variable which contains the flags used in
 	 the mprotect calls.  */
-#if defined HAVE_Z_RELRO && defined SHARED
+#ifdef SHARED
       if ((mode & (__RTLD_DLOPEN | __RTLD_AUDIT)) == __RTLD_DLOPEN)
 	{
 	  const uintptr_t p = (uintptr_t) &__stack_prot & -GLRO(dl_pagesize);
@@ -1935,11 +1935,10 @@ open_path (const char *name, size_t namelen, int preloaded,
 	 must not be freed using the general free() in libc.  */
       if (sps->malloced)
 	free (sps->dirs);
-#ifdef HAVE_Z_RELRO
+
       /* rtld_search_dirs is attribute_relro, therefore avoid writing
 	 into it.  */
       if (sps != &rtld_search_dirs)
-#endif
 	sps->dirs = (void *) -1;
     }
 
diff --git a/elf/rtld.c b/elf/rtld.c
index edcc1f7e92..5e6ee51603 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -207,8 +207,7 @@ DL_SYSINFO_IMPLEMENTATION
    is fine, too.  The latter is important here.  We can avoid setting
    up a temporary link map for ld.so if we can mark _rtld_global as
    hidden.  */
-#if defined PI_STATIC_AND_HIDDEN && defined HAVE_HIDDEN \
-    && defined HAVE_VISIBILITY_ATTRIBUTE
+#ifdef PI_STATIC_AND_HIDDEN
 # define DONT_USE_BOOTSTRAP_MAP	1
 #endif