public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/toolchain/binutils-patches:master commit in: 9999/
Date: Sun, 30 Jul 2023 14:49:51 +0000 (UTC)	[thread overview]
Message-ID: <1690728576.60851e7be32d7d3014de98b85bd5b58b1ad6fdd3.dilfridge@gentoo> (raw)

commit:     60851e7be32d7d3014de98b85bd5b58b1ad6fdd3
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 30 14:49:36 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 14:49:36 2023 +0000
URL:        https://gitweb.gentoo.org/proj/toolchain/binutils-patches.git/commit/?id=60851e7b

Add Sam's textrel patch

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 ...-failures-with-enable-textrel-check-error.patch | 139 +++++++++++++++++++++
 1 file changed, 139 insertions(+)

diff --git a/9999/0008-ld-Fix-test-failures-with-enable-textrel-check-error.patch b/9999/0008-ld-Fix-test-failures-with-enable-textrel-check-error.patch
new file mode 100644
index 0000000..7bf6a47
--- /dev/null
+++ b/9999/0008-ld-Fix-test-failures-with-enable-textrel-check-error.patch
@@ -0,0 +1,139 @@
+From mboxrd@z Thu Jan  1 00:00:00 1970
+Return-Path: <SRS0=Su1r=DO=gentoo.org=sam@sourceware.org>
+Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
+	by sourceware.org (Postfix) with ESMTP id 3725A3858D20
+	for <binutils@sourceware.org>; Fri, 28 Jul 2023 15:20:56 +0000 (GMT)
+DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3725A3858D20
+Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org
+Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org
+From: Sam James <sam@gentoo.org>
+To: binutils@sourceware.org
+Cc: nickc@redhat.com,
+	Sam James <sam@gentoo.org>
+Subject: [PATCH] ld: Fix test failures with --enable-textrel-check=error
+Date: Fri, 28 Jul 2023 16:20:34 +0100
+Message-ID: <20230728152042.401562-1-sam@gentoo.org>
+X-Mailer: git-send-email 2.41.0
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
+X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org
+List-Id: <binutils.sourceware.org>
+
+Tested with the following:
+* --enable-textrel-check=error
+* --enable-warn-execstack=yes
+* --enable-warn-rwx-segments=yes
+* --enable-default-execstack=no
+in preparation for hopefully toggling these in Gentoo Hardened
+at least.
+
+This is similar in nature to 0ab7005043ee404dabfd690952efc25c399995ae
+and 340640f710e690b37c885166949595cde5f827b2.
+
+This fixes the following test failures:
+* FAIL: ld-x86-64/pr18801a
+* FAIL: ld-x86-64/pr18801b
+* FAIL: ld-x86-64/ifunc-textrel-1a
+* FAIL: ld-x86-64/ifunc-textrel-1b
+* FAIL: ld-i386/pr18801a
+* FAIL: ld-i386/pr18801b
+* FAIL: ld-i386/ifunc-textrel-1a
+* FAIL: ld-i386/ifunc-textrel-1b
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ ld/testsuite/ld-i386/ifunc-textrel-1a.d   | 2 +-
+ ld/testsuite/ld-i386/ifunc-textrel-1b.d   | 2 +-
+ ld/testsuite/ld-i386/pr18801a.d           | 2 +-
+ ld/testsuite/ld-i386/pr18801b.d           | 2 +-
+ ld/testsuite/ld-x86-64/ifunc-textrel-1a.d | 2 +-
+ ld/testsuite/ld-x86-64/ifunc-textrel-1b.d | 2 +-
+ ld/testsuite/ld-x86-64/pr18801a.d         | 2 +-
+ ld/testsuite/ld-x86-64/pr18801b.d         | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/ld/testsuite/ld-i386/ifunc-textrel-1a.d b/ld/testsuite/ld-i386/ifunc-textrel-1a.d
+index 15f545db03d..aad77e7d230 100644
+--- a/ld/testsuite/ld-i386/ifunc-textrel-1a.d
++++ b/ld/testsuite/ld-i386/ifunc-textrel-1a.d
+@@ -1,4 +1,4 @@
+ #source: ../ld-x86-64/ifunc-textrel-1.s
+ #as: --32
+-#ld: -m elf_i386 -pie
++#ld: -m elf_i386 -pie -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE
+diff --git a/ld/testsuite/ld-i386/ifunc-textrel-1b.d b/ld/testsuite/ld-i386/ifunc-textrel-1b.d
+index 6e4a67c48f0..bf0f2ac5df9 100644
+--- a/ld/testsuite/ld-i386/ifunc-textrel-1b.d
++++ b/ld/testsuite/ld-i386/ifunc-textrel-1b.d
+@@ -1,4 +1,4 @@
+ #source: ../ld-x86-64/ifunc-textrel-1.s
+ #as: --32
+-#ld: -m elf_i386 -shared
++#ld: -m elf_i386 -shared -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC
+diff --git a/ld/testsuite/ld-i386/pr18801a.d b/ld/testsuite/ld-i386/pr18801a.d
+index 73cb5d17beb..b1ef145a882 100644
+--- a/ld/testsuite/ld-i386/pr18801a.d
++++ b/ld/testsuite/ld-i386/pr18801a.d
+@@ -1,4 +1,4 @@
+ #source: pr18801.s
+ #as: --32
+-#ld: -m elf_i386 -pie
++#ld: -m elf_i386 -pie -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE
+diff --git a/ld/testsuite/ld-i386/pr18801b.d b/ld/testsuite/ld-i386/pr18801b.d
+index 0bf7fb729cb..983346ca248 100644
+--- a/ld/testsuite/ld-i386/pr18801b.d
++++ b/ld/testsuite/ld-i386/pr18801b.d
+@@ -1,4 +1,4 @@
+ #source: pr18801.s
+ #as: --32
+-#ld: -m elf_i386 -shared
++#ld: -m elf_i386 -shared -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC
+diff --git a/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d b/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d
+index 64a1e7021fd..667366091b9 100644
+--- a/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d
++++ b/ld/testsuite/ld-x86-64/ifunc-textrel-1a.d
+@@ -1,4 +1,4 @@
+ #source: ifunc-textrel-1.s
+ #as: --64 -defsym __x86_64__=1
+-#ld: -m elf_x86_64 -pie
++#ld: -m elf_x86_64 -pie -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE
+diff --git a/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d b/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d
+index aeb31fdb3dc..f7b8e02a72c 100644
+--- a/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d
++++ b/ld/testsuite/ld-x86-64/ifunc-textrel-1b.d
+@@ -1,4 +1,4 @@
+ #source: ifunc-textrel-1.s
+ #as: --64 -defsym __x86_64__=1
+-#ld: -m elf_x86_64 -shared
++#ld: -m elf_x86_64 -shared -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC
+diff --git a/ld/testsuite/ld-x86-64/pr18801a.d b/ld/testsuite/ld-x86-64/pr18801a.d
+index 2b4159d3044..61f9d991185 100644
+--- a/ld/testsuite/ld-x86-64/pr18801a.d
++++ b/ld/testsuite/ld-x86-64/pr18801a.d
+@@ -1,4 +1,4 @@
+ #source: pr18801.s
+ #as: --64
+-#ld: -melf_x86_64 -pie
++#ld: -melf_x86_64 -pie -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIE
+diff --git a/ld/testsuite/ld-x86-64/pr18801b.d b/ld/testsuite/ld-x86-64/pr18801b.d
+index 34dab1aa6cb..967a339f90b 100644
+--- a/ld/testsuite/ld-x86-64/pr18801b.d
++++ b/ld/testsuite/ld-x86-64/pr18801b.d
+@@ -1,4 +1,4 @@
+ #source: pr18801.s
+ #as: --64
+-#ld: -melf_x86_64 -shared
++#ld: -melf_x86_64 -shared -z notext
+ #warning: GNU indirect functions with DT_TEXTREL may result in a segfault at runtime; recompile with -fPIC
+-- 
+2.41.0
+
+


             reply	other threads:[~2023-07-30 14:49 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-30 14:49 Andreas K. Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-03 22:43 [gentoo-commits] proj/toolchain/binutils-patches:master commit in: 9999/ Andreas K. Hüttel
2024-06-29 17:05 Andreas K. Hüttel
2024-06-29 16:32 Andreas K. Hüttel
2024-06-29 16:32 Andreas K. Hüttel
2024-06-28 21:48 Andreas K. Hüttel
2023-10-27  0:44 Sam James
2023-10-27  0:44 Sam James
2023-07-28 16:23 Andreas K. Hüttel
2023-06-30  9:21 WANG Xuerui
2023-04-02 11:44 Andreas K. Hüttel
2023-01-05 16:22 Andreas K. Hüttel
2023-01-05 16:21 Andreas K. Hüttel
2023-01-03 23:03 Andreas K. Hüttel
2023-01-02 23:50 Andreas K. Hüttel
2022-10-08 12:15 WANG Xuerui
2022-07-29  7:55 WANG Xuerui
2022-01-15 22:27 Andreas K. Hüttel
2021-08-17 20:07 Andreas K. Hüttel
2021-07-30 23:25 Andreas K. Hüttel
2021-07-24 20:57 Andreas K. Hüttel
2021-07-20 19:53 Andreas K. Hüttel
2021-07-20 19:50 Andreas K. Hüttel
2021-07-06  7:04 Sergei Trofimovich
2021-07-06  7:04 Sergei Trofimovich
2021-07-06  7:04 Sergei Trofimovich
2020-07-25 17:27 Andreas K. Hüttel
2020-07-25 12:26 Andreas K. Hüttel
2020-07-25 12:23 Andreas K. Hüttel
2020-07-25 12:20 Andreas K. Hüttel
2020-05-19 21:12 Andreas K. Hüttel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1690728576.60851e7be32d7d3014de98b85bd5b58b1ad6fdd3.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox