From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id A27AE38768A0; Wed, 30 Aug 2023 12:34:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A27AE38768A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693398856; bh=HzSXUDPk1MrmUl81oBp98QFpW/D/McdBvq9Dt59LSKw=; h=From:To:Subject:Date:From; b=MhoYgJM/nihwb1bYX3LiuSNHN6bdVHSpIxxydyQsr8eDoCJ20Ai9Pf8hKO42OC9y1 Ft9wbsRxbpbXvLM1oivHtKkpXwI+4Btz+M4rBdUMHGIt1rgKH4d2OhVC8FObdu7mEb WaNla0C1z/hwn/Vx2SzadoRGx8DZM4ZfHimFYum8= 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: 92cf68bab4a8ebe8a0fe91dcf1261a7c3d80a52f X-Git-Newrev: 0cd0e48738055d717aa26415b0ab35fe783a03ca Message-Id: <20230830123416.A27AE38768A0@sourceware.org> Date: Wed, 30 Aug 2023 12:34:16 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0cd0e48738055d717aa26415b0ab35fe783a03ca commit 0cd0e48738055d717aa26415b0ab35fe783a03ca 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 5794614488..2184522c93 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