From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 949B93858C2A; Thu, 21 Dec 2023 18:51:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 949B93858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703184683; bh=WrDJrlFU3ArXS16oAT7vCjH4Y5Kp/5yiIn5FwrxCF+c=; h=From:To:Subject:Date:From; b=dnG4iAGbgQk/en7OahRwlxl5etocoTO4ZJrspVuqeBbvyyWNe+FYAkU+iy8Dicebd gYqj7spjcYd7tbChNZ0wilfol9Ae3XwZOvATvfrjy0gIGapXZkcDdNj2FW6VmhKgyf FU8gMm9w7SaYF54/yTxdxiiOza4b8LNnHZnI5ZV4= 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: f5f480e3c560967660390c4f56dab82046638b89 X-Git-Newrev: 1c526ad3c29bbbcea3f7135cab8b9c3ba1ce099e Message-Id: <20231221185123.949B93858C2A@sourceware.org> Date: Thu, 21 Dec 2023 18:51:23 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1c526ad3c29bbbcea3f7135cab8b9c3ba1ce099e commit 1c526ad3c29bbbcea3f7135cab8b9c3ba1ce099e 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 a226119295..6aa8300f2b 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