From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 3C4D3385841F; Tue, 4 Oct 2022 12:57:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C4D3385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664888224; bh=iuj7/3WYd5Q4jh09wV4tmQb5opkevoEcSgv+uLjpsSU=; h=From:To:Subject:Date:From; b=Z+UdRm9URhYpITIkuWH22enfe8ZxSZWgoEoPP7c8cONGGqXKf0f/MfrgV4aiQt6yo Uc1zfqjVsYtZ8v8WtsxNzkNgmHGhEpL3etKkkP0W2mi6/ofxbO28GIVRAsmF3VTqEt Ln3YzeDqKCmFtkJJymuSwYcqzCFbgkgzEa2b8fp4= 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: 1b68d46e3df8f64267b6759a9fa57058d9467d26 X-Git-Newrev: 7373a986fbb2066a5b17cd98fa3d2f49a33cde5c Message-Id: <20221004125704.3C4D3385841F@sourceware.org> Date: Tue, 4 Oct 2022 12:57:04 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7373a986fbb2066a5b17cd98fa3d2f49a33cde5c commit 7373a986fbb2066a5b17cd98fa3d2f49a33cde5c 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 033a433778..e01cc82879 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