From: H.J. Lu Date: Fri, 4 Aug 2017 19:58:01 +0000 (-0700) Subject: Compile tst-prelink.c without PIE [BZ #21815] X-Git-Tag: glibc-2.27~1229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e13daad7ac81968e9aaa4a87497f898bb15f4ef8;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 6a50d235f59..8291f6e05b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-08-04 H.J. Lu + + [BZ #21815] + * elf/Makefile (CFLAGS-tst-prelink.c): New. + (LDFLAGS-tst-prelink): Likewise. + 2017-08-04 H.J. Lu * sysdeps/unix/sysv/linux/i386/sysdep.h (I386_USE_SYSENTER): diff --git a/elf/Makefile b/elf/Makefile index 2956445de88..828daaa0be7 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