From patchwork Wed Dec 21 13:35:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 88734 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2272653qgi; Wed, 21 Dec 2016 05:36:30 -0800 (PST) X-Received: by 10.84.134.131 with SMTP id 3mr8784937plh.89.1482327390167; Wed, 21 Dec 2016 05:36:30 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id h38si26733108plb.115.2016.12.21.05.36.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Dec 2016 05:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-76175-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-76175-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-76175-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=t6DV drzwt5pgsmFfQ0pde2tRWr0zYlPKrdo/uFr4Wi9mOChwBonXcUqEI7ZY17k+/4++ icwZZQk2YSdHVP/AAn7gmyWyZtSYhFTgzUX2cpKlPCsEreNaIL3qBh85zYHGy6Al KosMwM9ihxEoptZofhkEvAwcFuBdNnC74FtpBPA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=P7evoZT7Gy 0Qbqg7zJLEVktWweA=; b=FYWZkA7KgTpla0jwvEHvOJtSgr/DyNDZo6V7ZqVpd7 oz9f6dDsvp3uij9s+MXoL8BN5pjSQKGASEg9Zc6UI1ptt8fqGnhJ8s6Og042y5jW l/D2X3ltuMCp0LEls4USya3FyrUsjt2cDCFfF9a0rF4DBgECOFwSnoI6GBcmdhq5 Y= Received: (qmail 110116 invoked by alias); 21 Dec 2016 13:36:07 -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 110061 invoked by uid 89); 21 Dec 2016 13:36:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=alcock, 2016-12-21 X-HELO: mx1.redhat.com Subject: Re: [PATCH 14/15] tst-quad1pie, tst-quad2pie: compile with -fPIE To: Nix , libc-alpha@sourceware.org References: <20161219111528.14969-1-nix@esperi.org.uk> <20161219111528.14969-15-nix@esperi.org.uk> From: Florian Weimer Message-ID: <9de96df6-c531-50d1-879e-d6a82f272a8f@redhat.com> Date: Wed, 21 Dec 2016 14:35:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161219111528.14969-15-nix@esperi.org.uk> On 12/19/2016 12:15 PM, Nix wrote: > From: Nick Alcock > > With stack protection enabled, these files have external symbol > references for the first time, so the fact that they are not compiled > with -fPIE and are then linked into a -pie binary starts to hurt. > > v10: New. > > * sysdeps/x86_64/Makefile (CFLAGS-tst-quad1pie.c): Add PIE-ccflag. > (CFLAGS-tst-quad2pie.c): Likewise. This is what I committed. Thanks, Florian x86_64: tst-quad1pie, tst-quad2pie: compile with -fPIE [BZ #7065] With stack protection enabled, these files have external symbol references for the first time, so the fact that they are not compiled with -fPIE and are then linked into a -pie binary starts to hurt. 2016-12-21 Nick Alcock [BZ #7065] * sysdeps/x86_64/Makefile [$(subdir) = elf] (CFLAGS-tst-quad1pie.c, CFLAGS-tst-quad2pie.c): Add $(PIE-ccflag). diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 6d99284..5f25893 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -49,6 +49,9 @@ extra-test-objs += tst-quadmod1pie.o tst-quadmod2pie.o $(objpfx)tst-quad1pie: $(objpfx)tst-quadmod1pie.o $(objpfx)tst-quad2pie: $(objpfx)tst-quadmod2pie.o +CFLAGS-tst-quad1pie.c = $(PIE-ccflag) +CFLAGS-tst-quad2pie.c = $(PIE-ccflag) + tests += tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7 tst-audit10 test-extras += tst-audit4-aux tst-audit10-aux extra-test-objs += tst-audit4-aux.o tst-audit10-aux.o