[COMMITTED] x86-64: Pass -z separate-code to ld for -z mark-plt tests

Message ID CAMe9rOoVeBz3ZmU8Ny-xT7g1V5N1sYCmtt1pjLT27bgxjaJdng@mail.gmail.com
State New
Headers
Series [COMMITTED] x86-64: Pass -z separate-code to ld for -z mark-plt tests |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

H.J. Lu Feb. 27, 2025, 12:23 a.m. UTC
  On Thu, Feb 27, 2025 at 7:27 AM Alan Modra <amodra@gmail.com> wrote:
>
> On Mon, Feb 24, 2025 at 03:59:30PM +0100, Clément Chigot wrote:
> > Those tests were generated by a linker having "-z separate-code" on by
> > default. However, being controlled by a configure option, it can be off
> > by default. Forcing the option as part of the tests ensures clean
> > results in both cases.
>
> Right, thanks for fixing this.
>
> x86_64-linux-gnu configured with --disable-separate-code still sees
> some fails.  I'm going to leave it to the x86 maintainers to fix these
> remaining failures.
> FAIL: ld-x86-64/mark-plt-1a
> FAIL: ld-x86-64/mark-plt-1b
> FAIL: ld-x86-64/mark-plt-1c
> FAIL: ld-x86-64/mark-plt-1d
> FAIL: ld-x86-64/mark-plt-1a-x32
> FAIL: ld-x86-64/mark-plt-1b-x32
> FAIL: ld-x86-64/mark-plt-1c-x32
> FAIL: ld-x86-64/mark-plt-1d-x32
>

This is what I checked in.

Thanks.
  

Patch

From c44400b6ad8abe1ea1682959523e9574963a2956 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 27 Feb 2025 08:19:29 +0800
Subject: [PATCH] x86-64: Pass -z separate-code to ld for -z mark-plt tests

Pass -z separate-code to ld for -z mark-plt tests to fix:

FAIL: ld-x86-64/mark-plt-1a
FAIL: ld-x86-64/mark-plt-1b
FAIL: ld-x86-64/mark-plt-1c
FAIL: ld-x86-64/mark-plt-1d
FAIL: ld-x86-64/mark-plt-1a-x32
FAIL: ld-x86-64/mark-plt-1b-x32
FAIL: ld-x86-64/mark-plt-1c-x32
FAIL: ld-x86-64/mark-plt-1d-x32

when binutils is configured with --disable-separate-code.

	* ld-x86-64/mark-plt-1a-x32.d: Pass -z separate-code to ld.
	* ld-x86-64/mark-plt-1a.d: Likewise.
	* ld-x86-64/mark-plt-1b-x32.d: Likewise.
	* ld-x86-64/mark-plt-1b.d: Likewise.
	* ld-x86-64/mark-plt-1c-x32.d: Likewise.
	* ld-x86-64/mark-plt-1c.d: Likewise.
	* ld-x86-64/mark-plt-1d-x32.d: Likewise.
	* ld-x86-64/mark-plt-1d.d: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 ld/testsuite/ld-x86-64/mark-plt-1a-x32.d | 2 +-
 ld/testsuite/ld-x86-64/mark-plt-1a.d     | 2 +-
 ld/testsuite/ld-x86-64/mark-plt-1b-x32.d | 2 +-
 ld/testsuite/ld-x86-64/mark-plt-1b.d     | 2 +-
 ld/testsuite/ld-x86-64/mark-plt-1c-x32.d | 2 +-
 ld/testsuite/ld-x86-64/mark-plt-1c.d     | 2 +-
 ld/testsuite/ld-x86-64/mark-plt-1d-x32.d | 2 +-
 ld/testsuite/ld-x86-64/mark-plt-1d.d     | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d
index 4bef117dd0c..bcff5a142c7 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --x32
-#ld: -melf32_x86_64 -shared -z mark-plt --no-rosegment
+#ld: -melf32_x86_64 -shared -z mark-plt -z separate-code --no-rosegment
 #readelf: -drW
 
 #...
diff --git a/ld/testsuite/ld-x86-64/mark-plt-1a.d b/ld/testsuite/ld-x86-64/mark-plt-1a.d
index f6b246ef230..f2feb065e6f 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1a.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1a.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --64
-#ld: -melf_x86_64 -shared -z mark-plt --no-rosegment
+#ld: -melf_x86_64 -shared -z mark-plt -z separate-code --no-rosegment
 #readelf: -drW
 
 #...
diff --git a/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d
index d105768bed3..703102454d6 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --x32
-#ld: -melf32_x86_64 -shared -z mark-plt --hash-style=both --no-rosegment
+#ld: -melf32_x86_64 -shared -z mark-plt -z separate-code --hash-style=both --no-rosegment
 #objdump: -dw
 
 #...
diff --git a/ld/testsuite/ld-x86-64/mark-plt-1b.d b/ld/testsuite/ld-x86-64/mark-plt-1b.d
index 9af69fdbbb2..721b83aa504 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1b.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1b.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --64
-#ld: -melf_x86_64 -shared -z mark-plt --hash-style=both --no-rosegment
+#ld: -melf_x86_64 -shared -z mark-plt -z separate-code --hash-style=both --no-rosegment
 #objdump: -dw
 
 #...
diff --git a/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d
index 6ea71a1e7f8..7a8453efab7 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --x32
-#ld: -melf32_x86_64 -shared -z mark-plt -z ibtplt --no-rosegment
+#ld: -melf32_x86_64 -shared -z mark-plt -z separate-code -z ibtplt --no-rosegment
 #readelf: -drW
 
 #...
diff --git a/ld/testsuite/ld-x86-64/mark-plt-1c.d b/ld/testsuite/ld-x86-64/mark-plt-1c.d
index 1713c8863f8..91721403831 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1c.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1c.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --64
-#ld: -melf_x86_64 -shared -z mark-plt -z ibtplt --no-rosegment
+#ld: -melf_x86_64 -shared -z mark-plt -z separate-code -z ibtplt --no-rosegment
 #readelf: -drW
 
 #...
diff --git a/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d
index 0e709d6306e..82642056bfc 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --x32
-#ld: -melf32_x86_64 -shared -z mark-plt -z ibtplt --hash-style=both --no-rosegment
+#ld: -melf32_x86_64 -shared -z mark-plt -z separate-code -z ibtplt --hash-style=both --no-rosegment
 #objdump: -dw
 
 #...
diff --git a/ld/testsuite/ld-x86-64/mark-plt-1d.d b/ld/testsuite/ld-x86-64/mark-plt-1d.d
index 1ec9a9cacb4..a4155b2e067 100644
--- a/ld/testsuite/ld-x86-64/mark-plt-1d.d
+++ b/ld/testsuite/ld-x86-64/mark-plt-1d.d
@@ -1,6 +1,6 @@ 
 #source: mark-plt-1.s
 #as: --64
-#ld: -melf_x86_64 -shared -z mark-plt -z ibtplt --hash-style=both --no-rosegment
+#ld: -melf_x86_64 -shared -z mark-plt -z separate-code -z ibtplt --hash-style=both --no-rosegment
 #objdump: -dw
 
 #...
-- 
2.48.1