aboutsummaryrefslogtreecommitdiff
path: root/elf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile68
1 files changed, 60 insertions, 8 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 1282a5b..3a5596e 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -57,9 +57,11 @@ dl-routines = \
dl-close \
dl-debug \
dl-debug-symbols \
+ dl-debug_state \
dl-deps \
dl-exception \
dl-execstack \
+ dl-execstack-tunable \
dl-find_object \
dl-fini \
dl-init \
@@ -267,6 +269,7 @@ tests-static-normal := \
tst-array1-static \
tst-array5-static \
tst-dl-iter-static \
+ tst-dlopen-sgid \
tst-dst-static \
tst-env-setuid-static \
tst-getauxval-static \
@@ -417,6 +420,8 @@ tests += \
tst-dlmopen1 \
tst-dlmopen3 \
tst-dlmopen4 \
+ tst-dlmopen4-nonpic \
+ tst-dlmopen4-pic \
tst-dlopen-auditdup \
tst-dlopen-constructor-null \
tst-dlopen-self \
@@ -494,6 +499,7 @@ tests += \
tst-tls21 \
tst-tls22 \
tst-tls22-gnu2 \
+ tst-tls23 \
tst-tlsalign \
tst-tlsalign-extern \
tst-tlsgap \
@@ -537,6 +543,8 @@ tests-internal += \
tst-dl_find_object-threads \
tst-dlmopen2 \
tst-hash-collision3 \
+ tst-link-map-contiguous-ldso \
+ tst-link-map-contiguous-libc \
tst-ptrguard1 \
tst-stackguard1 \
tst-tls-surplus \
@@ -548,6 +556,10 @@ tests-internal += \
unload2 \
# tests-internal
+ifeq ($(build-hardcoded-path-in-tests),yes)
+tests-internal += tst-link-map-contiguous-main
+endif
+
tests-container += \
tst-dlopen-self-container \
tst-dlopen-tlsmodid-container \
@@ -572,9 +584,11 @@ tests-execstack-yes = \
tst-execstack \
tst-execstack-needed \
tst-execstack-prog \
+ tst-execstack-tunable \
# tests-execstack-yes
tests-execstack-static-yes = \
- tst-execstack-prog-static
+ tst-execstack-prog-static \
+ tst-execstack-prog-static-tunable \
# tests-execstack-static-yes
ifeq (yes,$(run-built-tests))
tests-execstack-special-yes = \
@@ -765,6 +779,12 @@ modules-names += \
libmarkermod5-3 \
libmarkermod5-4 \
libmarkermod5-5 \
+ libmarkermod6-1 \
+ libmarkermod6-2 \
+ libmarkermod6-3 \
+ libmarkermod6-4 \
+ libmarkermod6-5 \
+ libmarkermod6-6 \
liborigin-mod \
libtracemod1-1 \
libtracemod2-1 \
@@ -914,6 +934,7 @@ modules-names += \
tst-dlopen-auditdupmod \
tst-dlopen-constructor-null-mod1 \
tst-dlopen-constructor-null-mod2 \
+ tst-dlopen-sgid-mod \
tst-dlopen-tlsreinitmod1 \
tst-dlopen-tlsreinitmod2 \
tst-dlopen-tlsreinitmod3 \
@@ -1012,6 +1033,7 @@ modules-names += \
tst-tls22-mod1-gnu2 \
tst-tls22-mod2 \
tst-tls22-mod2-gnu2 \
+ tst-tls23-mod \
tst-tlsalign-lib \
tst-tlsgap-mod0 \
tst-tlsgap-mod1 \
@@ -1366,11 +1388,11 @@ $(objpfx)$(1).generated-makefile: $(objpfx)$(1)
endef
endif
-postclean-generated += $(objpfx)/dso-sort-tests-1.generated-makefile \
- $(objpfx)/dso-sort-tests-2.generated-makefile \
- $(objpfx)/dso-sort-tests-all2.generated-makefile \
- $(objpfx)/dso-sort-tests-all3.generated-makefile \
- $(objpfx)/dso-sort-tests-all4.generated-makefile
+postclean-generated += $(objpfx)dso-sort-tests-1.generated-makefile \
+ $(objpfx)dso-sort-tests-2.generated-makefile \
+ $(objpfx)dso-sort-tests-all2.generated-makefile \
+ $(objpfx)dso-sort-tests-all3.generated-makefile \
+ $(objpfx)dso-sort-tests-all4.generated-makefile
# Generate from each testcase description file
$(eval $(call include_dsosort_tests,dso-sort-tests-1.def))
@@ -2023,6 +2045,14 @@ LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
CFLAGS-tst-execstack-prog.c += -Wno-trampolines
CFLAGS-tst-execstack-mod.c += -Wno-trampolines
+# It expects loading a module with executable stack to work.
+CFLAGS-tst-execstack-tunable.c += -DUSE_PTHREADS=0 -DDEFAULT_RWX_STACK=1
+$(objpfx)tst-execstack-tunable.out: $(objpfx)tst-execstack-mod.so
+tst-execstack-tunable-ENV = GLIBC_TUNABLES=glibc.rtld.execstack=2
+
+LDFLAGS-tst-execstack-prog-static-tunable = -Wl,-z,noexecstack
+tst-execstack-prog-static-tunable-ENV = GLIBC_TUNABLES=glibc.rtld.execstack=2
+
LDFLAGS-tst-execstack-prog-static = -Wl,-z,execstack
ifeq ($(have-no-error-execstack),yes)
LDFLAGS-tst-execstack-prog-static += -Wl,--no-error-execstack
@@ -2237,6 +2267,13 @@ $(objpfx)tst-dlmopen3.out: $(objpfx)tst-dlmopen1mod.so
$(objpfx)tst-dlmopen4.out: $(objpfx)tst-dlmopen1mod.so
+CFLAGS-tst-dlmopen4-pic.c += -fPIC
+$(objpfx)tst-dlmopen4-pic.out: $(objpfx)tst-dlmopen1mod.so
+
+CFLAGS-tst-dlmopen4-nonpic.c += -fno-pie
+tst-dlmopen4-nonpic-no-pie = yes
+$(objpfx)tst-dlmopen4-nonpic.out: $(objpfx)tst-dlmopen1mod.so
+
$(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so
tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
@@ -2855,6 +2892,7 @@ LDFLAGS-libmarkermod2-1.so += -Wl,-soname,libmarkermod2.so
LDFLAGS-libmarkermod3-1.so += -Wl,-soname,libmarkermod3.so
LDFLAGS-libmarkermod4-1.so += -Wl,-soname,libmarkermod4.so
LDFLAGS-libmarkermod5-1.so += -Wl,-soname,libmarkermod5.so
+LDFLAGS-libmarkermod6-1.so += -Wl,-soname,libmarkermod6.so
$(objpfx)libmarkermod%.os : markermodMARKER-VALUE.c
$(compile-command.c) \
-DMARKER=marker$(firstword $(subst -, ,$*)) \
@@ -2869,6 +2907,8 @@ $(objpfx)libmarkermod4.so: $(objpfx)libmarkermod4-1.so
cp $< $@
$(objpfx)libmarkermod5.so: $(objpfx)libmarkermod5-1.so
cp $< $@
+$(objpfx)libmarkermod6.so: $(objpfx)libmarkermod6-1.so
+ cp $< $@
# tst-glibc-hwcaps-prepend checks that --glibc-hwcaps-prepend is
# preferred over auto-detected subdirectories.
@@ -3027,7 +3067,7 @@ $(objpfx)tst-rtld-list-diagnostics.out: tst-rtld-list-diagnostics.py \
> $@; \
$(evaluate-test)
-$(objpfx)tst-rtld-run-static.out: $(objpfx)/ldconfig
+$(objpfx)tst-rtld-run-static.out: $(objpfx)ldconfig
$(objpfx)tst-dl_find_object.out: \
$(objpfx)tst-dl_find_object-mod1.so $(objpfx)tst-dl_find_object-mod2.so
@@ -3338,9 +3378,11 @@ $(objpfx)tst-dlopen-auditdup.out: \
# Reuse an audit module which provides ample debug logging.
tst-rtld-no-malloc-audit-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
+$(objpfx)tst-rtld-no-malloc-audit.out: $(objpfx)tst-auditmod1.so
# Any shared object should do.
tst-rtld-no-malloc-preload-ENV = LD_PRELOAD=$(objpfx)tst-auditmod1.so
+$(objpfx)tst-rtld-no-malloc-preload.out: $(objpfx)tst-auditmod1.so
LDFLAGS-tst-hash-collision1-mod.so = -Wl,--hash-style=both
$(objpfx)tst-hash-collision1: $(objpfx)tst-hash-collision1-mod.so
@@ -3388,6 +3430,13 @@ tst-tls22-mod1-gnu2.so-no-z-defs = yes
tst-tls22-mod2.so-no-z-defs = yes
tst-tls22-mod2-gnu2.so-no-z-defs = yes
+$(objpfx)tst-tls23: $(shared-thread-library)
+$(objpfx)tst-tls23.out: $(objpfx)tst-tls23-mod.so
+
+ifneq (no,$(have-test-mtls-traditional))
+CFLAGS-tst-tls23-mod.c += -mtls-dialect=$(have-test-mtls-traditional)
+endif
+
ifeq ($(have-test-cc-cflags-fsemantic-interposition),yes)
# Compiler may default to -fno-semantic-interposition. These modules
# must be compiled with -fsemantic-interposition.
@@ -3453,7 +3502,8 @@ $(objpfx)tst-dlopen-constructor-null-mod2.so: \
CFLAGS-tst-origin.c += $(no-stack-protector)
CFLAGS-liborigin-mod.c += $(no-stack-protector)
# Link tst-origin with liborigin-mod.so, but without a full path.
-LDFLAGS-tst-origin += -Wl,-rpath,\$$ORIGIN -L$(subst :, -L,$(rpath-link)) -lorigin-mod
+LDFLAGS-tst-origin += -Wl,-rpath,\$$ORIGIN -L$(subst :, -L,$(rpath-link))
+LDLIBS-tst-origin += -lorigin-mod
$(objpfx)tst-origin: +nolink-deps += $(objpfx)liborigin-mod.so
$(objpfx)tst-origin: $(objpfx)liborigin-mod.so
$(objpfx)tst-origin.out: tst-origin.sh $(objpfx)tst-origin
@@ -3467,3 +3517,5 @@ $(objpfx)tst-origin.out: tst-origin.sh $(objpfx)tst-origin
liborigin-mod.so \
> $@; \
$(evaluate-test)
+
+$(objpfx)tst-dlopen-sgid.out: $(objpfx)tst-dlopen-sgid-mod.so