From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id B2E723858403 for ; Mon, 25 Jul 2022 08:08:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2E723858403 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id EC60133F02; Mon, 25 Jul 2022 08:08:31 +0000 (UTC) Received: from hawking.suse.de (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 3FC8F2C14F; Mon, 25 Jul 2022 08:08:31 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id D3985444B2F; Mon, 25 Jul 2022 10:08:30 +0200 (CEST) From: Andreas Schwab To: liuzhensong Cc: binutils@sourceware.org, maskray@google.com, caiyinyu@loongson.cn, xuchenghua@loongson.cn, chenglulu@loongson.cn Subject: Re: [PATCH] LoongArch: Set defaults to exec stack 0. References: <20220725022227.16266-1-liuzhensong@loongson.cn> X-Yow: .. the HIGHWAY is made out of LIME JELLO and my HONDA is a barbequed OYSTER! Yum! Date: Mon, 25 Jul 2022 10:08:30 +0200 In-Reply-To: <20220725022227.16266-1-liuzhensong@loongson.cn> (liuzhensong@loongson.cn's message of "Mon, 25 Jul 2022 10:22:27 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2022 08:08:34 -0000 On Jul 25 2022, liuzhensong wrote: > diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c > index 4efe3d9370c..43182ead8cd 100644 > --- a/bfd/elfnn-loongarch.c > +++ b/bfd/elfnn-loongarch.c > @@ -132,6 +132,7 @@ struct loongarch_elf_link_hash_table > > #define elf_backend_want_dynrelro 1 > #define elf_backend_rela_normal 1 > +#define elf_backend_default_execstack 0 AFAICS, the loongarch kernel defaults to executable stack: arch/loongarch/include/asm/elf.h:#define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT) Which means this change is wrong. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."