[PATCH] ld: Limit "readelf --got-contents" tests
H.J. Lu
hjl.tools@gmail.com
Thu Sep 4 13:26:33 GMT 2025
Since "readelf --got-contents" tests use -melf_i386, -melf_x86_64 and
-melf32_x86_64 emulations, limit theses tests to targets with those
emulations.
PR ld/33350
* testsuite/ld-i386/binutils.exp: Limit tests to targets with
-melf_i386 support.
* testsuite/ld-x86-64/binutils.exp: Limit tests to targets with
-melf_x86_64 and -melf32_x86_64 support.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
ld/testsuite/ld-i386/binutils.exp | 8 +++++++-
ld/testsuite/ld-x86-64/binutils.exp | 5 ++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ld/testsuite/ld-i386/binutils.exp b/ld/testsuite/ld-i386/binutils.exp
index 11a2687141d..f3b26bed9d8 100644
--- a/ld/testsuite/ld-i386/binutils.exp
+++ b/ld/testsuite/ld-i386/binutils.exp
@@ -23,7 +23,13 @@ if ![is_elf_format] {
return
}
-if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } {
+# Tests here need -melf_i386 support.
+if { !([istarget "i?86-*-elf*"]
+ || [istarget "i?86-*-linux*"]
+ || [istarget "i?86-*-gnu*"]
+ || [istarget "x86_64-*-elf*"]
+ || [istarget "x86_64-*-linux*"]
+ || [istarget "x86_64-*-gnu*"]) } {
return
}
diff --git a/ld/testsuite/ld-x86-64/binutils.exp b/ld/testsuite/ld-x86-64/binutils.exp
index f482151a5c0..e2b3e0aeffb 100644
--- a/ld/testsuite/ld-x86-64/binutils.exp
+++ b/ld/testsuite/ld-x86-64/binutils.exp
@@ -23,7 +23,10 @@ if ![is_elf_format] {
return
}
-if { ![istarget "x86_64-*-*"] } {
+# Tests here need -melf_x86_64 and -melf32_x86_64 support.
+if { !([istarget "x86_64-*-elf*"]
+ || [istarget "x86_64-*-linux*"]
+ || [istarget "x86_64-*-gnu*"]) } {
return
}
--
2.51.0
More information about the Binutils
mailing list