diff options
author | Alan Modra <amodra@gmail.com> | 2024-08-07 07:56:33 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2024-08-07 09:37:12 +0930 |
commit | b93dcd1cdd193f119d86d9a9ee84b8dabdef28c5 (patch) | |
tree | a257db3e29d44436e34af7be08a21a86d946671a /ld | |
parent | c42ee4a1ca8596fee9b1a1381256994e828799a6 (diff) | |
download | gdb-b93dcd1cdd193f119d86d9a9ee84b8dabdef28c5.zip gdb-b93dcd1cdd193f119d86d9a9ee84b8dabdef28c5.tar.gz gdb-b93dcd1cdd193f119d86d9a9ee84b8dabdef28c5.tar.bz2 |
loongarch ld testsuite xpasses
Some tests started passing with commit 3a83f0342e54. However,
supporting a changed ld output format is not so simple, and the change
to the loongarch_elf_hash_table macro needs further changes to the
rest of the code. It is true that some uses of
loongarch_elf_hash_table do not need to check the type of the hash
table, but others like loongarch_elf_relax_section do need to check.
bfd_relax_section is called in lang_size_sections using the input bfd,
not the output bfd. If the input bfd may be of different type to the
output, then the hash table type must be checked before accessing
elements of the hash table. This patch corrects
loongarch_elf_relax_section. I haven't checked all the uses of the
hash table throughout the loongarch backend.
bfd/
* elfnn-loongarch.c (loongarch_elf_relax_section): Don't relax
unless the hash table is loongarch_elf_link_hash_table.
Move variable declarations. Formatting.
ld/
* testsuite/ld-elf/pr21884.d: Don't xfail loongarach.
* testsuite/ld-unique/pr21529.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-elf/pr21884.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-unique/pr21529.d | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elf/pr21884.d b/ld/testsuite/ld-elf/pr21884.d index e289b41..3d44ccf 100644 --- a/ld/testsuite/ld-elf/pr21884.d +++ b/ld/testsuite/ld-elf/pr21884.d @@ -3,7 +3,7 @@ #ld: -T pr21884.t #objdump: -b binary -s #xfail: aarch64*-*-* arm*-*-* avr-*-* ia64-*-* m68hc1*-*-* nds32*-*-* -#xfail: riscv*-*-* score-*-* v850-*-* loongarch*-*-* +#xfail: riscv*-*-* score-*-* v850-*-* # Skip targets which can't change output format to binary. .*: file format binary diff --git a/ld/testsuite/ld-unique/pr21529.d b/ld/testsuite/ld-unique/pr21529.d index 896f872..fb63794 100644 --- a/ld/testsuite/ld-unique/pr21529.d +++ b/ld/testsuite/ld-unique/pr21529.d @@ -1,6 +1,6 @@ #ld: --oformat binary -T pr21529.ld -e main #objdump: -s -b binary -#xfail: aarch64*-*-* arm*-*-* avr-*-* ia64-*-* m68hc1*-*-* nds32*-*-* riscv*-*-* score-*-* v850-*-* loongarch*-*-* +#xfail: aarch64*-*-* arm*-*-* avr-*-* ia64-*-* m68hc1*-*-* nds32*-*-* riscv*-*-* score-*-* v850-*-* # Skip targets which can't change output format to binary. #pass |