From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 6C2CC3858C50 for ; Thu, 28 Jul 2022 14:11:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6C2CC3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 72D7ABA92E for ; Thu, 28 Jul 2022 16:11:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YfG9Emsf9hoO for ; Thu, 28 Jul 2022 16:11:10 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508547b6.dip0.t-ipconnect.de [80.133.71.182]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id E4697BA750 for ; Thu, 28 Jul 2022 16:11:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1659017470; bh=6VSzo47NVEnh07m3YkMSBnEk0gKrCSqEvKswVs+7V8s=; h=From:To:Subject:Date:From; b=Fam20ur54rbIU0gpq2mJgUaOnf9RYXmthRLv3f6cKF/k1QyQvZ9DtD5gqF3ZKibJJ dMO4OruIHcPTQFSYkZsI2AX6NCAP4amAwUVH5FXhJuVnfFq10QSHWCR9Wm+QdPYH/n lDglL7E3CypNjjZX4bzm4+ebpEJuutFbGQNG5Hv8AUHKXs2Enbw5iiayCB7t6VBHX6 l6MikeHehdGfHbMgTxCA/Do8OQ8kTXsUd9qqkZyY/QR6z/+nNvATs3+VsXqi//zCoH 9lBDCADYfIUAXUSXPXrMPlp+IvDx6DdQ12736Z//NfqUO/7EU2UaBSP7b4alrICZE6 oGfNy6SS4rfhw== From: Rainer Orth To: binutils@sourceware.org Subject: [PATCH] ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411] Date: Thu, 28 Jul 2022 16:11:09 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-3795.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, 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: Thu, 28 Jul 2022 14:11:13 -0000 --=-=-= Content-Type: text/plain As discussed in PR ld/29411, the ld warning [...] has a LOAD segment with RWX permissions needs to be disabled on all SPARC targets, not just Solaris/SPARC: the .plt section is required to be RWX by the 32-bit SPARC ELF psABI and the 64-bit SPARC Compliance Definition 2.4.1. Given that ld only supports SPARC ELF targets, this patch implements this. Tested on sparc64-unknown-linux-gnu and sparc-sun-solaris2.11. Ok for master and the 2.39 branch? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2022-07-28 Rainer Orth ld: PR ld/29411 * configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all sparc targets. Expand comment. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=ld-warn-rwx-sparc.patch diff --git a/ld/configure.tgt b/ld/configure.tgt --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -49,13 +49,13 @@ if test "${ac_default_ld_warn_rwx_segmen case "${targ}" in # The CRIS default linker script yields just one segment # as intended, so a rwx segment warning is not helpful. - # The HPPA's PLT section uses a constructed trampoline + # The HPPA's and SPARC's PLT sections use a constructed trampoline # hence it needs to have a RWX segment. # Many MIPS targets use executable segments. cris-*-* | crisv32-*-* | \ hppa*-*-* | \ - sparc*-*-solaris2* | \ - mips*-*-*) + mips*-*-* | \ + sparc*-*-*) ac_default_ld_warn_rwx_segments=0 ;; *) --=-=-=--