aboutsummaryrefslogtreecommitdiff
path: root/elf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 073807ba85..3dcc550def 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -542,6 +542,25 @@ tests-special += \
# tests-special
endif
endif
+ifeq ($(have-dt-relr),yes)
+tests += \
+ tst-relr \
+# tests
+ifeq ($(have-fpie),yes)
+tests += \
+ tst-relr-pie \
+# tests
+tests-pie += \
+ tst-relr-pie \
+# tests-pie
+tests-special += \
+ $(objpfx)check-tst-relr-pie.out \
+# tests-special
+endif
+CFLAGS-tst-relr-pie.c += $(pie-ccflag)
+LDFLAGS-tst-relr += -Wl,-z,pack-relative-relocs
+LDFLAGS-tst-relr-pie += -Wl,-z,pack-relative-relocs
+endif
endif
tests-special += $(objpfx)tst-relro-ldso.out $(objpfx)tst-relro-libc.out
@@ -2789,3 +2808,9 @@ $(objpfx)check-abi-version-libc.out: $(common-objpfx)libc.so
| sed -ne '/.gnu.version_d/, /.gnu.version_r/ p' \
| grep GLIBC_ABI_DT_RELR > $@; \
$(evaluate-test)
+
+$(objpfx)check-tst-relr-pie.out: $(objpfx)tst-relr-pie
+ LC_ALL=C $(OBJDUMP) -p $< \
+ | sed -ne '/required from libc.so/,$$ p' \
+ | grep GLIBC_ABI_DT_RELR > $@; \
+ $(evaluate-test)