From e13daad7ac81968e9aaa4a87497f898bb15f4ef8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 4 Aug 2017 12:58:01 -0700 Subject: Compile tst-prelink.c without PIE [BZ #21815] tst-prelink.c checks for conflict with GLOB_DAT relocation against stdio. On i386, there is no GLOB_DAT relocation against stdio with PIE. We should compile tst-prelink.c without PIE. [BZ #21815] * elf/Makefile (CFLAGS-tst-prelink.c): New. (LDFLAGS-tst-prelink): Likewise. --- elf/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'elf') diff --git a/elf/Makefile b/elf/Makefile index 2956445..828daaa 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -358,6 +358,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 -- cgit v1.1