aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elf/Makefile7
-rw-r--r--elf/tst-execstack-prog-static.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile
index e8fc6bd..cea48e9 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -567,6 +567,9 @@ tests-execstack-yes = \
tst-execstack-needed \
tst-execstack-prog \
# tests-execstack-yes
+tests-execstack-static-yes = \
+ tst-execstack-prog-static
+ # tests-execstack-static-yes
endif
endif
ifeq ($(have-depaudit),yes)
@@ -662,6 +665,7 @@ $(objpfx)tst-rtld-dash-dash.out: tst-rtld-dash-dash.sh $(objpfx)ld.so
$(evaluate-test)
tests += $(tests-execstack-$(have-z-execstack))
+tests-static+= $(tests-execstack-static-$(have-z-execstack))
ifeq ($(run-built-tests),yes)
tests-special += \
$(objpfx)tst-ldconfig-X.out \
@@ -1982,6 +1986,9 @@ LDFLAGS-tst-execstack-needed = -Wl,-z,noexecstack
LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
CFLAGS-tst-execstack-prog.c += -Wno-trampolines
CFLAGS-tst-execstack-mod.c += -Wno-trampolines
+
+LDFLAGS-tst-execstack-prog-static = -Wl,-z,execstack
+CFLAGS-tst-execstack-prog-static.c += -Wno-trampolines
endif
LDFLAGS-tst-array2 = -Wl,--no-as-needed
diff --git a/elf/tst-execstack-prog-static.c b/elf/tst-execstack-prog-static.c
new file mode 100644
index 0000000..328065d
--- /dev/null
+++ b/elf/tst-execstack-prog-static.c
@@ -0,0 +1 @@
+#include <tst-execstack-prog.c>