From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 0A0B9385842B; Fri, 9 Feb 2024 17:29:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A0B9385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707499753; bh=Hczo6N8IKiVw852Ad1jJJpZ16ZMNeb0sedCPaAmd+k8=; h=From:To:Subject:Date:From; b=QSf9Ul2x9LBk2ugJAnb3o4hY9dgQNcIMuq2yibW+XYmQkbM6WhJR6GPP6ejbSo/ea xKvNeh5HCGHCcTcPFZM65DlGW844wv0VD2FK2B3l5M/ClfRXJpQZgyvC5vNjo19sqE NkH26BRy5tkfU1VmYBzmsVF5HYQ75Zy612EhHqSE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Fix inhibit_stack_protector for clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 9eefbaccf079c3ed7381071205c867cdcc385f79 X-Git-Newrev: 00fe06da54c78c1dc5caea994bb51733e4b11fe7 Message-Id: <20240209172913.0A0B9385842B@sourceware.org> Date: Fri, 9 Feb 2024 17:29:13 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=00fe06da54c78c1dc5caea994bb51733e4b11fe7 commit 00fe06da54c78c1dc5caea994bb51733e4b11fe7 Author: Adhemerval Zanella Date: Wed Mar 9 17:43:42 2022 -0300 Fix inhibit_stack_protector for clang Diff: --- include/libc-symbols.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/libc-symbols.h b/include/libc-symbols.h index e21bb599b3..d14837631b 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -365,8 +365,13 @@ for linking") /* Used to disable stack protection in sensitive places, like ifunc resolvers and early static TLS init. */ #ifdef HAVE_CC_NO_STACK_PROTECTOR -# define inhibit_stack_protector \ +# ifdef __clang__ +# define inhibit_stack_protector \ + __attribute__((no_stack_protector)) +# else +# define inhibit_stack_protector \ __attribute__ ((__optimize__ ("-fno-stack-protector"))) +# endif #else # define inhibit_stack_protector #endif