From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 431CE3858D32; Mon, 29 Jan 2024 17:54:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 431CE3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706550886; bh=5JrjbVha8xaY07ZAJkdsnJybtkBq6W+Pecnl3D6c7GA=; h=From:To:Subject:Date:From; b=fNsYD4kVPq15fijQQGKhc3QqDiZ8vvYPK9faR+ySVxUR8EoMqRcJfE+iAW9xSqMfF qeQNl7asVdX6P+mvCs5ErKdb2WYT4Rfa0RWJ6XBvqVO8Vg5/Dw0DKCW8h5c6f3/xS6 8P3ft3CbkyabSLKbxs0sA3/nzH2uxDZxm/0Ta7n4= 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: 02a321a267336bf5df895df808a9f36e0c44b5f9 X-Git-Newrev: 41d5b220bf612299a467ecbf14c6139981603837 Message-Id: <20240129175446.431CE3858D32@sourceware.org> Date: Mon, 29 Jan 2024 17:54:45 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=41d5b220bf612299a467ecbf14c6139981603837 commit 41d5b220bf612299a467ecbf14c6139981603837 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 e21bb599b3..d14837631b 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