From patchwork Tue Mar 9 18:12:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1450115 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=huC8UDrM; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dw3VS3XRGz9sPf for ; Wed, 10 Mar 2021 05:23:12 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3001A395BC24; Tue, 9 Mar 2021 18:23:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3001A395BC24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615314190; bh=jT57/NhnT7nVgyd2hvV8J6kfqgG2yqOFpWQsJEpngPM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=huC8UDrMClc9ZzdQAHboIIv3RIeSj/qYvwqkgTChf7mh4O0MeertdD7xZLu6J7Zdk ER+3i/w8EFkBVQhG1e9zYSuJ9yGAgdIBOss5jCVtzacRLuP/6860C7sizO7AXRcTVb C2R1M9HRxxJBtN8QwVvjGKnJCC5Z3YDD1MB5IM7U= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from camel.birch.relay.mailchannels.net (camel.birch.relay.mailchannels.net [23.83.209.29]) by sourceware.org (Postfix) with ESMTPS id 823D93959E42 for ; Tue, 9 Mar 2021 18:23:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 823D93959E42 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D81B2101363; Tue, 9 Mar 2021 18:13:20 +0000 (UTC) Received: from pdx1-sub0-mail-a30.g.dreamhost.com (100-105-161-82.trex.outbound.svc.cluster.local [100.105.161.82]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9CA95101AE4; Tue, 9 Mar 2021 18:13:19 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a30.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.105.161.82 (trex/6.0.2); Tue, 09 Mar 2021 18:13:20 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Reign-Harbor: 51a5015a764e122d_1615313600332_1339522100 X-MC-Loop-Signature: 1615313600332:4183680219 X-MC-Ingress-Time: 1615313600332 Received: from pdx1-sub0-mail-a30.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTP id A5CEA7F04F; Tue, 9 Mar 2021 10:13:15 -0800 (PST) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTPSA id 00F6D7E694; Tue, 9 Mar 2021 10:13:12 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a30 To: libc-alpha@sourceware.org Subject: [PATCH 1/3] Build get-cpuid-feature-leaf.c without stack-protector Date: Tue, 9 Mar 2021 23:42:57 +0530 Message-Id: <20210309181259.2603144-2-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210309181259.2603144-1-siddhesh@sourceware.org> References: <20210309181259.2603144-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3495.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" __x86_get_cpuid_feature_leaf is called during early startup, before the stack check guard is initialized and is hence not safe to build with -fstack-protector. --- sysdeps/x86/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile index e1f9379fd8..ca3ef886c1 100644 --- a/sysdeps/x86/Makefile +++ b/sysdeps/x86/Makefile @@ -7,6 +7,8 @@ sysdep_routines += get-cpuid-feature-leaf sysdep-dl-routines += dl-get-cpu-features sysdep_headers += sys/platform/x86.h +CFLAGS-get-cpuid-feature-leaf.c += $(no-stack-protector) + tests += tst-get-cpu-features tst-get-cpu-features-static \ tst-cpu-features-cpuinfo tst-cpu-features-cpuinfo-static \ tst-cpu-features-supports tst-cpu-features-supports-static From patchwork Tue Mar 9 18:12:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1450112 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ZKJ/ZQ+D; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dw3TF3wsQz9sW1 for ; Wed, 10 Mar 2021 05:22:09 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B406395BC24; Tue, 9 Mar 2021 18:22:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B406395BC24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615314125; bh=4rLRFesskLQOBmIMBQalvSvmvbgN0fhRI7/k+RqeBdo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ZKJ/ZQ+D0EKasM8Uc4m2lLI/3sEHG6riUaVvVru1ApM3xxa2NjpTlw0wYNYWHCva6 KPlNqWJtwtUW1PWlquDGqOqp6uCXFqgY1oq7oO5wv1gUwDwLN1JysZxAM3wPl+R71D 2yCYig1qwUoj0FD5eGcIB/20QZd2r7l2Y29z9UXo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from chocolate.ash.relay.mailchannels.net (chocolate.ash.relay.mailchannels.net [23.83.222.35]) by sourceware.org (Postfix) with ESMTPS id D6A983959E42 for ; Tue, 9 Mar 2021 18:22:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6A983959E42 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E15CC7E20B5; Tue, 9 Mar 2021 18:13:20 +0000 (UTC) Received: from pdx1-sub0-mail-a30.g.dreamhost.com (100-96-27-126.trex.outbound.svc.cluster.local [100.96.27.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DC9A47E2182; Tue, 9 Mar 2021 18:13:19 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a30.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.27.126 (trex/6.0.2); Tue, 09 Mar 2021 18:13:20 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Sponge-Exultant: 39d3223374aff976_1615313600542_1412638301 X-MC-Loop-Signature: 1615313600542:376654119 X-MC-Ingress-Time: 1615313600542 Received: from pdx1-sub0-mail-a30.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTP id 0E5A87E694; Tue, 9 Mar 2021 10:13:18 -0800 (PST) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTPSA id 2642A7F04D; Tue, 9 Mar 2021 10:13:15 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a30 To: libc-alpha@sourceware.org Subject: [PATCH 2/3] Disable stack protector for ifunc resolvers in tests Date: Tue, 9 Mar 2021 23:42:58 +0530 Message-Id: <20210309181259.2603144-3-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210309181259.2603144-1-siddhesh@sourceware.org> References: <20210309181259.2603144-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3495.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" IFUNC resolvers get called too early for stack protector to be useful, so fix the elf tests to disable stack protector for the resolver functions. This fixes test failures in the static tests on x86_64. --- elf/ifuncmain9.c | 1 + sysdeps/x86/tst-ifunc-isa.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/elf/ifuncmain9.c b/elf/ifuncmain9.c index 2c4e95a051..e775c5cfa9 100644 --- a/elf/ifuncmain9.c +++ b/elf/ifuncmain9.c @@ -43,6 +43,7 @@ implementation (void) } static __typeof__ (implementation) * +inhibit_stack_protector resolver (void) { ++resolver_called; diff --git a/sysdeps/x86/tst-ifunc-isa.h b/sysdeps/x86/tst-ifunc-isa.h index 60aa1cea6a..6d906966a7 100644 --- a/sysdeps/x86/tst-ifunc-isa.h +++ b/sysdeps/x86/tst-ifunc-isa.h @@ -29,6 +29,7 @@ enum isa }; enum isa +__attribute__ ((__optimize__ ("-fno-stack-protector"))) get_isa (void) { if (CPU_FEATURE_USABLE (AVX512F)) @@ -83,6 +84,7 @@ isa_none (void) int foo (void) __attribute__ ((ifunc ("foo_ifunc"))); void * +__attribute__ ((__optimize__ ("-fno-stack-protector"))) foo_ifunc (void) { switch (get_isa ()) From patchwork Tue Mar 9 18:12:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1450100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ytU7tWL7; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dw3HH3JbVz9sW1 for ; Wed, 10 Mar 2021 05:13:31 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 91D5D388A431; Tue, 9 Mar 2021 18:13:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91D5D388A431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615313609; bh=ICwmidexbuEPcAAxU4nH37Xh70EwkvP/wu3ef7ddm6I=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ytU7tWL70huCjyC6AdT1J14Udx6eaw2XOG34dfzzhps5yRbUaMeoEygS4v0HAlQ3l 5uais9IPVkeXCd62Wz6ELl5ZNeswfORvtw/GKZcukPJWfr9DMTr3uho21CfpqpW0Ft pXwDK0gkYV1PFAHz9xuyipVMrpTc6d2QsP02h5Gc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from eastern.birch.relay.mailchannels.net (eastern.birch.relay.mailchannels.net [23.83.209.55]) by sourceware.org (Postfix) with ESMTPS id F05EE384BC30 for ; Tue, 9 Mar 2021 18:13:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F05EE384BC30 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 52513323A80; Tue, 9 Mar 2021 18:13:21 +0000 (UTC) Received: from pdx1-sub0-mail-a30.g.dreamhost.com (100-96-27-126.trex.outbound.svc.cluster.local [100.96.27.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D4CF83238E2; Tue, 9 Mar 2021 18:13:20 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a30.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.27.126 (trex/6.0.2); Tue, 09 Mar 2021 18:13:21 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Bubble-Belong: 14eb936c7e71a060_1615313601171_2851946283 X-MC-Loop-Signature: 1615313601171:4140731261 X-MC-Ingress-Time: 1615313601171 Received: from pdx1-sub0-mail-a30.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTP id 654DA7E6B7; Tue, 9 Mar 2021 10:13:20 -0800 (PST) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a30.g.dreamhost.com (Postfix) with ESMTPSA id 9A8757F04D; Tue, 9 Mar 2021 10:13:18 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a30 To: libc-alpha@sourceware.org Subject: [PATCH 3/3] Build libc-start with stack protector for SHARED Date: Tue, 9 Mar 2021 23:42:59 +0530 Message-Id: <20210309181259.2603144-4-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210309181259.2603144-1-siddhesh@sourceware.org> References: <20210309181259.2603144-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3495.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This does not change the emitted code since __libc_start_main does not return, but is important for formal flags compliance. This also cleans up the cosmetic inconsistency in the stack protector flags in csu, especially the incorrect value of STACK_PROTECTOR_LEVEL. --- Makeconfig | 4 ++++ csu/Makefile | 22 ++++++++++++---------- elf/Makefile | 4 ---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Makeconfig b/Makeconfig index 0a4811b5e5..c99464fdfa 100644 --- a/Makeconfig +++ b/Makeconfig @@ -856,6 +856,10 @@ ifneq ($(stack-protector),) +stack-protector=$(stack-protector) endif +define elide-stack-protector +$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-stack-protector)) +endef + # This is the program that generates makefile dependencies from C source files. # The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy # targets for headers so that removed headers don't break the build. diff --git a/csu/Makefile b/csu/Makefile index e587434be8..3054329cea 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -45,18 +45,20 @@ install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies) # code is compiled with special flags. tests = -CFLAGS-.o += $(no-stack-protector) -CFLAGS-.op += $(no-stack-protector) -CFLAGS-.os += $(no-stack-protector) - -# Dummy object not actually used for anything. It is linked into -# crt1.o nevertheless, which in turn is statically linked into +# static-reloc.os is a dummy object not actually used for anything. It is +# linked into crt1.o nevertheless, which in turn is statically linked into # applications, so that build flags matter. # See . -# NB: Using $(stack-protector) in this way causes a wrong definition -# STACK_PROTECTOR_LEVEL due to the preceding $(no-stack-protector), -# but it does not matter for this source file. -CFLAGS-static-reloc.os += $(stack-protector) +# +# libc-start.os is safe to be built with stack protector since +# __libc_start_main is called after stack canary setup is done. +ssp-safe.os = static-reloc libc-start + +CFLAGS-.o += $(call elide-stack-protector,.o,$(routines)) +CFLAGS-.op += $(call elide-stack-protector,.op,$(routines)) +CFLAGS-.oS += $(call elide-stack-protector,.oS,$(routines)) +CFLAGS-.os += $(call elide-stack-protector,.os,$(filter-out \ + $(ssp-safe.os),$(routines))) ifeq (yes,$(build-shared)) extra-objs += S$(start-installed-name) gmon-start.os diff --git a/elf/Makefile b/elf/Makefile index b06bf6ca20..285d9f2f3c 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -83,10 +83,6 @@ endif # Also compile all routines in the static library that are elided from # the shared libc because they are in libc.a in the same way. -define elide-stack-protector -$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-stack-protector)) -endef - CFLAGS-.o += $(call elide-stack-protector,.o,$(elide-routines.os)) CFLAGS-.op += $(call elide-stack-protector,.op,$(elide-routines.os)) CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines))