about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--elf/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile
index e758a4c960..d39f4c5665 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -356,6 +356,9 @@ update-all-abi: update-all-abi-ld
 
 ifeq ($(have-glob-dat-reloc),yes)
 tests += tst-prelink
+# Don't compile tst-prelink.c with PIE for GLOB_DAT relocation.
+CFLAGS-tst-prelink.c += -fno-pie
+LDFLAGS-tst-prelink = $(no-pie-ldflag)
 ifeq ($(run-built-tests),yes)
 tests-special += $(objpfx)tst-prelink-cmp.out
 endif