From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 198D13858024; Thu, 9 Feb 2023 19:46:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 198D13858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675971972; bh=5MkDFMe1KT7lLt5jP3KHhJ3verFMuuJvzjCqUKWZRYM=; h=From:To:Subject:Date:From; b=q5Rxdp+gglbqJ70HAy2Vs0zdaBmLryfy5CuLkFq+6o5Dw6EPhLvetsy+S4w13hg4T 9E9Z524n7xgeozZ1C+797u6M663yKySy++n2+lnmoAbE6X1bvR79uLE1TiAvn20/zs 5GvYoZPMi/swDxl5wsYOkrn+pZr4FIgZSrSY5kfw= 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: eef3711c3fda687641f4d3dc2fe7fc559c0f3ca9 X-Git-Newrev: 085824a254e0caf2b7e38747497a935f2c58adb8 Message-Id: <20230209194612.198D13858024@sourceware.org> Date: Thu, 9 Feb 2023 19:46:12 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=085824a254e0caf2b7e38747497a935f2c58adb8 commit 085824a254e0caf2b7e38747497a935f2c58adb8 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 37c91bb3a4..41c5022e04 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