@@ -543,6 +543,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
ifeq ($(have-depaudit),yes)
tests += \
@@ -630,6 +633,7 @@ $(objpfx)tst-rtld-does-not-exist.out: tst-rtld-does-not-exist.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)noload-mem.out \
@@ -1856,6 +1860,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
new file mode 100644
@@ -0,0 +1 @@
+#include <tst-execstack-prog.c>