about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-07-19 12:04:14 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-02 07:50:15 -0700
commit77ea4ed16046b68e27bd0862c15db419d1dac8ad (patch)
treef5ce44aa16b219409410ee1185ca8ad1c8c84014
parent00cdcf5a4110f7ac68651f5662693c82f7bffaca (diff)
downloadglibc-hjl/pr21815/master.tar.gz
glibc-hjl/pr21815/master.tar.xz
glibc-hjl/pr21815/master.zip
Compile tst-prelink.c without PIE [BZ #21815] hjl/pr21815/master
tst-prelink.c checks for conflict with GLOB_DAT relocation against
stdout.  On i386, there is no GLOB_DAT relocation against stdout with
PIE.  Compile tst-prelink.c without PIE to generate GLOB_DAT relocation.

	[BZ #21815]
	* elf/Makefile (CFLAGS-tst-prelink.c): New.
	(LDFLAGS-tst-prelink): Likewise.
-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