aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-loongarch-elf/desc-ie.d
AgeCommit message (Collapse)AuthorFilesLines
2024-06-20LoongArch: TLS IE needs only one dynamic relocXi Ruoyao1-4/+4
As the comment in the code says, TLS_IE needs only one dynamic reloc. But commit b67a17aa7c0c ("LoongArch: Fix the issue of excessive relocation generated by GD and IE") has incorrectly allocated the space for two dynamic relocs, causing libc.so to contain 8 R_LARCH_NONE. Adjust tlsdesc-dso.d for the offset changes and add two tests to ensure there are no R_LARCH_NONE with TLS. Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2024-04-01LoongArch: Fix the issue of excessive relocation generated by GD and IELulu Cai1-2/+2
Currently, whether GD and IE generate dynamic relocation is determined by SYMBOL_REFERENCES_LOCAL and bfd_link_executable. This results in dynamic relocations still being generated in some situations where dynamic relocations are not necessary (such as the undefined weak symbol in static links). We use RLARCH_TLS_GD_IE_NEED_DYN_RELOC macros to determine whether GD/IE needs dynamic relocation. If GD/IE requires dynamic relocation, set need_reloc to true and indx to be a dynamic index. At the same time, some test cases were modified to use regular expression matching instead of complete disassembly matching.
2024-03-06LoongArch: Fix some test cases for TLS transition and relaxLulu Cai1-8/+6
2024-01-22LoongArch: Fix some test failures about TLS desc and TLS relaxationXi Ruoyao1-1/+1
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>
2023-12-25LoongArch: Add testsuit for DESC and tls transition and tls relaxation.Lulu Cai1-0/+16