From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 13338382A2D2; Fri, 28 Oct 2022 17:39:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13338382A2D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666978753; bh=5Bnt8TVNdDAkO+ynNN5JAJl9li8Yveas6M+XNaHymk8=; h=From:To:Subject:Date:From; b=axbI8gtfyQcfMZaalsePIDBCLQIzroIz23u7IA42TywxKQJB4vtNzmo7KKPBpLelm R2slNtruRM7/DcEj/4sHg8+Rg0i6w9TuiJC2NetMUlqNufCp0zs+d58qNOb57i1xEV zBd6Asa74sBCf/vFLbj6tnYtD8vg4F+kAvnX/VrQ= 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: 6b64624a6afcfb04fc8d0ccc53a4840301b7983c X-Git-Newrev: 8e54961dc28bb0c9a45623646767ae45ba503543 Message-Id: <20221028173913.13338382A2D2@sourceware.org> Date: Fri, 28 Oct 2022 17:39:13 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8e54961dc28bb0c9a45623646767ae45ba503543 commit 8e54961dc28bb0c9a45623646767ae45ba503543 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 f4437ff6ad..140ee0ff6d 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -432,8 +432,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