diff options
author | Lulu Cai <cailulu@loongson.cn> | 2024-03-21 16:33:21 +0800 |
---|---|---|
committer | liuzhensong <liuzhensong@loongson.cn> | 2024-04-01 17:41:56 +0800 |
commit | b67a17aa7c0c478a2f2c2f045854e9745abfe114 (patch) | |
tree | 6f63f30ff8aad6887c8c0860d44bebfefa0f55c2 /ld/testsuite/ld-loongarch-elf/desc-ie.d | |
parent | 7918b183ec7844b7d54a2164a177898e2db59f2e (diff) | |
download | gdb-b67a17aa7c0c478a2f2c2f045854e9745abfe114.zip gdb-b67a17aa7c0c478a2f2c2f045854e9745abfe114.tar.gz gdb-b67a17aa7c0c478a2f2c2f045854e9745abfe114.tar.bz2 |
LoongArch: Fix the issue of excessive relocation generated by GD and IE
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.
Diffstat (limited to 'ld/testsuite/ld-loongarch-elf/desc-ie.d')
-rw-r--r-- | ld/testsuite/ld-loongarch-elf/desc-ie.d | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ld/testsuite/ld-loongarch-elf/desc-ie.d b/ld/testsuite/ld-loongarch-elf/desc-ie.d index e1f49e2..c833b23 100644 --- a/ld/testsuite/ld-loongarch-elf/desc-ie.d +++ b/ld/testsuite/ld-loongarch-elf/desc-ie.d @@ -9,6 +9,6 @@ Disassembly of section .text: [0-9a-f]+ <fn1>: +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* - +[0-9a-f]+: 28cca084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 28cd0084 ld.d \$a0, \$a0, .* +[0-9a-f]+: 1a000084 pcalau12i \$a0, .* - +[0-9a-f]+: 28cca084 ld.d \$a0, \$a0, .* + +[0-9a-f]+: 28cd0084 ld.d \$a0, \$a0, .* |