From patchwork Sun Feb 28 16:41:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nix X-Patchwork-Id: 11131 Received: (qmail 86355 invoked by alias); 28 Feb 2016 16:42:09 -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 86279 invoked by uid 89); 28 Feb 2016 16:42:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=UD:7.0.198.g6dd47b6, UD:2.7.0.198.g6dd47b6, sk:2.7.0.1, sk:2701 X-HELO: mail.esperi.org.uk From: Nix To: libc-alpha@sourceware.org Subject: [PATCH 10/16] Link various tests with -fno-stack-protector. Date: Sun, 28 Feb 2016 16:41:29 +0000 Message-Id: <1456677695-29778-11-git-send-email-nix@esperi.org.uk> In-Reply-To: <1456677695-29778-1-git-send-email-nix@esperi.org.uk> References: <1456677695-29778-1-git-send-email-nix@esperi.org.uk> X-DCC-URT-Metrics: spindle 1060; Body=1 Fuz1=1 From: Nick Alcock These tests do not link with libc, so cannot see __stack_chk_fail(). v3: Use $(no-stack-protector). --- elf/Makefile | 4 ++++ stdlib/Makefile | 3 +++ sysdeps/x86_64/Makefile | 3 +++ 3 files changed, 10 insertions(+) diff --git a/elf/Makefile b/elf/Makefile index 8f0973d..7a1c939 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -751,6 +751,10 @@ $(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so $< -Wl,-F,$(objpfx)filtmod2.so $(objpfx)filter: $(objpfx)filtmod1.so +# These do not link against libc. +CFLAGS-filtmod1.c = $(no-stack-protector) +CFLAGS-filtmod2.c = $(no-stack-protector) + $(objpfx)unload: $(libdl) $(objpfx)unload.out: $(objpfx)unloadmod.so diff --git a/stdlib/Makefile b/stdlib/Makefile index 26fe67a..d601b87 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -164,6 +164,9 @@ LDFLAGS-tst-putenv = $(no-as-needed) $(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os $(link-libc-deps) $(build-module) +# This is not only not in libc, it's not even linked with it. +CFLAGS-tst-putenvmod.c += $(no-stack-protector) + libof-tst-putenvmod = extramodules $(objpfx)bug-getcontext: $(libm) diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 67ed5ba..6caa74a 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -40,6 +40,9 @@ quad-pie-test += tst-quad1pie tst-quad2pie tests += $(quad-pie-test) tests-pie += $(quad-pie-test) +CFLAGS-tst-quad1pie.c = $(no-stack-protector) +CFLAGS-tst-quad2pie.c = $(no-stack-protector) + $(objpfx)tst-quad1pie: $(objpfx)tst-quadmod1pie.o $(objpfx)tst-quad2pie: $(objpfx)tst-quadmod2pie.o