aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
authormengqinggang <mengqinggang@loongson.cn>2022-12-01 17:17:09 +0800
committerliuzhensong <liuzhensong@loongson.cn>2023-05-30 19:56:48 +0800
commit2bd766d6245bf9db77c42da3537c949ffb814bfc (patch)
tree032b6f2c21936d0e05f4cefcdc4565869ab8cf94 /ld/testsuite/ld-elf
parent56576f4a722b7398d35802ecf7d4185c27d6d69b (diff)
downloadgdb-2bd766d6245bf9db77c42da3537c949ffb814bfc.zip
gdb-2bd766d6245bf9db77c42da3537c949ffb814bfc.tar.gz
gdb-2bd766d6245bf9db77c42da3537c949ffb814bfc.tar.bz2
LoongArch: ld: Add support for linker relaxation.
Add ld relax support and testsuits. ld/ChangeLog: * emultempl/loongarchelf.em: Regenerated. * testsuite/ld-elf/compressed1d.d: Xfail loongarch*-*. * testsuite/ld-elf/pr26936.d: Likewise. * testsuite/ld-loongarch-elf/disas-jirl.d: Regenerated. * testsuite/ld-loongarch-elf/disas-jirl-32.d: Regenerated. * testsuite/ld-loongarch-elf/jmp_op.d: Likewise. * testsuite/ld-loongarch-elf/macro_op.d: Likewise. * testsuite/ld-loongarch-elf/macro_op_32.d: Likewise. * testsuite/ld-loongarch-elf/relax-align.dd: New test. * testsuite/ld-loongarch-elf/relax-align.s: New test. * testsuite/ld-loongarch-elf/relax.exp: New test. * testsuite/ld-loongarch-elf/relax.s: New test. * testsuite/ld-loongarch-elf/uleb128.dd: New test. * testsuite/ld-loongarch-elf/uleb128.s: New test.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/compressed1d.d3
-rw-r--r--ld/testsuite/ld-elf/pr26936.d4
2 files changed, 5 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elf/compressed1d.d b/ld/testsuite/ld-elf/compressed1d.d
index 9d891c1..b178695 100644
--- a/ld/testsuite/ld-elf/compressed1d.d
+++ b/ld/testsuite/ld-elf/compressed1d.d
@@ -4,10 +4,13 @@
#readelf: -SW
#xfail: [uses_genelf]
#xfail: [riscv_little_endian]
+#xfail: loongarch*-*-*
# Not all ELF targets use the elf.em emulation...
# RISC-V has linker relaxations that delete code, so text label subtractions
# do not get resolved at assembly time, which results in a compressed section
# for little endian targets; but it is uncompressed for big endian targets.
+# LoongArch has linker relaxations that delete code, so text label subtractions
+# do not get resolved at assembly time, which results in a compressed section.
#failif
#...
diff --git a/ld/testsuite/ld-elf/pr26936.d b/ld/testsuite/ld-elf/pr26936.d
index c479f47..26c80ab 100644
--- a/ld/testsuite/ld-elf/pr26936.d
+++ b/ld/testsuite/ld-elf/pr26936.d
@@ -6,10 +6,10 @@
#readelf: -wL -W
#target: [check_shared_lib_support]
# Assembly source file for the HPPA assembler is renamed and modifed by
-# sed. mn10300 and riscv put different numbers of local symbols in
+# sed. loongarch and mn10300 and riscv put different numbers of local symbols in
# linkonce section and comdat sections. xtensa has more than one member
# in comdat groups.
-#xfail: am33_2.0-*-* hppa*-*-hpux* mn10300-*-* riscv*-*-* xtensa*-*-*
+#xfail: am33_2.0-*-* hppa*-*-hpux* loongarch*-*-* mn10300-*-* riscv*-*-* xtensa*-*-*
#...
CU: .*/pr26936c.s: