[COMMITTED] x86-64: Pass -z separate-code to ld for -z mark-plt tests
Checks
Commit Message
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.
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(-)
@@ -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
#...
@@ -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
#...
@@ -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
#...
@@ -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
#...
@@ -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
#...
@@ -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
#...
@@ -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
#...
@@ -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