[PATCH] gas/testsuite: adjust equ-reloc and redef
Fangrui Song
i@maskray.me
Wed Feb 25 05:53:37 GMT 2026
equ-reloc passes on all ELF target except alpha/hppa where
.set is a machine directive rather than an .equ alias.
For redef, remove hppa, iq2000, and mips from the exclusion list since
they pass. Move avr, m681, m68hc, vax, and xgate into the exclusion
list since their tc_fix_adjustable always prevents section symbol
conversion. Sort the remaining entries alphabetically.
Clean up trailing whitespace. Editors respecting .editorconfig would
trim trailing whitespace anyway.
---
gas/testsuite/gas/elf/elf.exp | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index b8c12711942..f1bb80974f9 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -4,15 +4,15 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# elf tests
@@ -173,30 +173,32 @@ if { [is_elf_format] } then {
switch -glob $target_triplet {
alpha*-*-* { }
am3*-*-* { }
+ avr-*-* { }
*c54x*-*-* { }
cr16*-*-* { }
crx*-*-* { }
h8300-*-* { }
- hppa*-*-* { }
- iq2000*-*-* { }
- mips*-*-* { }
+ loongarch*-*-* { }
+ m681*-*-* { }
+ m68hc*-*-* { }
mn10200-*-* { }
mn10300-*-* { }
msp43*-*-* { }
- rl78-*-* { }
riscv*-*-* { }
+ rl78-*-* { }
rx-*-* { }
- loongarch*-*-* { }
+ xgate-*-* { }
+ vax-*-* { }
default {
- # The next test can fail if the target does not convert fixups
- # against ordinary symbols into relocations against section symbols.
- # This is usually revealed by the error message:
- # symbol `sym' required but not present
- setup_xfail "m681*-*-*" "m68hc*-*-*" "xgate-*-*" "vax-*-*" "avr-*-*"
+ # The following tests require that the target adjusts relocations
+ # referencing local binding symbols to be against section symbols.
run_dump_test redef
- run_dump_test equ-reloc
}
}
+ # alpha and hppa use .set as a machine directive, not as an alias for .equ.
+ if {![istarget "alpha*-*-*"] && ![istarget "hppa*-*-*"]} {
+ run_dump_test equ-reloc
+ }
run_dump_test "pseudo"
run_dump_test "text-prev" $dump_opts
run_dump_test "text-subsect" $dump_opts
@@ -248,7 +250,7 @@ if { [is_elf_format] } then {
# in the symbol type test.
# We also need to exclude targets that do not support unique objects.
if { [istarget "*-*-hpux*"]
- || [istarget "arm*-*-*"]
+ || [istarget "arm*-*-*"]
|| [istarget "mips*-*-*"]
|| [istarget "msp*-*-*"]
|| [istarget "visium-*-*"]
@@ -383,7 +385,7 @@ if { [is_elf_format] } then {
run_dump_test "startof"
run_dump_test "missing-build-notes"
-
+
run_dump_test "common1"
run_dump_test "common2"
--
2.43.0
More information about the Binutils
mailing list