aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authormengqinggang <mengqinggang@loongson.cn>2023-07-11 11:21:18 +0800
committerliuzhensong <liuzhensong@loongson.cn>2023-07-24 11:22:42 +0800
commit3fa45fb168ceb04013d0dbd64d4a09d9cf284f63 (patch)
treea8ce8d0c9e67ede1b245b8321315f5150b91dfcc /ld/testsuite
parenta38b0c05b6e9444d94e8a4dd090584a8dcc313ad (diff)
downloadbinutils-3fa45fb168ceb04013d0dbd64d4a09d9cf284f63.zip
binutils-3fa45fb168ceb04013d0dbd64d4a09d9cf284f63.tar.gz
binutils-3fa45fb168ceb04013d0dbd64d4a09d9cf284f63.tar.bz2
LoongArch: ld: Simplify inserting IRELATIVE relocations to .rela.dyn
In LoongArch, the R_LARCH_IRELATIVE relocations for local ifunc symbols are in .rela.dyn. Before, this is done by loongarch_elf_finish_dynamic_sections. But this function is called after elf_link_sort_relocs, it need to find a null slot to insert IRELATIVE relocation. Now, it is processed by elf_loongarch_output_arch_local_syms before elf_link_sort_relocs, just need to call loongarch_elf_append_rela to insert IRELATIVE relocation. bfd/ChangeLog: * elfnn-loongarch.c (elfNN_allocate_local_ifunc_dynrelocs): Return type change to int. (loongarch_elf_size_dynamic_sections): Delete (void *). (loongarch_elf_finish_dynamic_symbol): Use loongarch_elf_append_rela insert IRELATIVE relocation to .rela.dyn. (elfNN_loongarch_finish_local_dynamic_symbol): Return type change to int. (loongarch_elf_finish_dynamic_sections): Delete process of local ifunc symbols. (elf_backend_output_arch_local_syms): New. ld/ChangeLog: * testsuite/ld-loongarch-elf/local-ifunc-reloc.d: Regenerated.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d b/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d
index 29f2d3f..bf73d9f 100644
--- a/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d
+++ b/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d
@@ -6,5 +6,5 @@
DYNAMIC RELOCATION RECORDS
OFFSET +TYPE +VALUE
-[[:xdigit:]]+ R_LARCH_IRELATIVE +\*ABS\*\+0x[[:xdigit:]]+
[[:xdigit:]]+ R_LARCH_64 +test
+[[:xdigit:]]+ R_LARCH_IRELATIVE +\*ABS\*\+0x[[:xdigit:]]+