From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id BAA743858D37; Wed, 17 Apr 2024 20:04:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BAA743858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713384297; bh=aLEKjafJjST/CJzWcIUO1tsTAjK11lldNsT5VS9xH18=; h=From:To:Subject:Date:From; b=ylZI0AAXTgmxdtCHcL926NvM6n7UlMKGNMrO/msnpOh8gxbWGrSY3Xr2RlAJ5RyEV ot8Nk8dbhp6dl7Ta33dxN+WU1Wkw5XG6Q7B5o3ImTnEFnzwV0w2GsoShaJPbG51HJk +3Rpu5ROwSqiF2Q8jJMiCLN9C7mG7OW52998+BQU= 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: fe8a949c64da3f4315692e3c07ddf9b495f51547 X-Git-Newrev: 68cbe438b55b250c651f69d731e5cf08f03a11cd Message-Id: <20240417200457.BAA743858D37@sourceware.org> Date: Wed, 17 Apr 2024 20:04:57 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=68cbe438b55b250c651f69d731e5cf08f03a11cd commit 68cbe438b55b250c651f69d731e5cf08f03a11cd 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 4367aa6740..0635e0dff7 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