]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
LoongArch: Fix some test failures about TLS desc and TLS relaxation
authorXi Ruoyao <xry111@xry111.site>
Fri, 19 Jan 2024 16:38:24 +0000 (00:38 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Mon, 22 Jan 2024 09:14:36 +0000 (17:14 +0800)
commit7b0b94b7b9a97c2af8c9557b2e5a3fc7ac3e6ee0
treed15da6c3fabc40819ee9a0fd74d16de1dbdfba30
parentd5e68872d0fd32a5ee28b292d97129baca6e66f7
LoongArch: Fix some test failures about TLS desc and TLS relaxation

There are two issues causing 11 test failures:

1. The TLS desc tests are matching the entire disassemble of a linked
   executable.  But if ld is configured --enable-default-hash-style=gnu
   (note that most modern distros use this option), the layout of the
   linked executables will be different and the immediate operands in
   the linked executables will also be different.  So we add
   "--hash-style=both" for these tests to cancel the effect of
   --enable-default-hash-style=gnu, like [x86_64 mark-plt tests].
2. By default objdump disassemble uses [pseudo-instructions] so "addi.w"
   is outputed as "li.w", causing mismatches in TLS relaxation tests.
   We can turn off the pseudo-instruction usage in objdump using "-M
   no-aliases" to fix them.

[x86_64 mark-plt tests]: 16666ccc91295d1568c5c2cb0e7600694840dfd9
[pseudo-instructions]: 17f9439038257b1de0c130a416a9a7645c653cb0

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
ld/testsuite/ld-loongarch-elf/desc-ie.d
ld/testsuite/ld-loongarch-elf/desc-norelax.d
ld/testsuite/ld-loongarch-elf/desc-relax.d
ld/testsuite/ld-loongarch-elf/relax.exp
ld/testsuite/ld-loongarch-elf/tlsdesc-dso.d