From patchwork Wed Aug 2 14:52:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 21843 Received: (qmail 123252 invoked by alias); 2 Aug 2017 14:53:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 123222 invoked by uid 89); 2 Aug 2017 14:52:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga03.intel.com X-ExtLoop1: 1 Date: Wed, 2 Aug 2017 07:52:55 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Compile tst-prelink.c without PIE [BZ #21815] Message-ID: <20170802145254.GA19486@gmail.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) 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. Any objections? H.J. --- [BZ #21815] * elf/Makefile (CFLAGS-tst-prelink.c): New. (LDFLAGS-tst-prelink): Likewise. --- elf/Makefile | 3 +++ 1 file changed, 3 insertions(+) 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