diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elfnn-loongarch.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c index add916e..2a79e00 100644 --- a/bfd/elfnn-loongarch.c +++ b/bfd/elfnn-loongarch.c @@ -891,8 +891,12 @@ loongarch_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, h->non_got_ref = 1; break; + /* For normal cmodel, pcalau12i + addi.d/w used to data. + For first version medium cmodel, pcalau12i + jirl are used to + function call, it need to creat PLT entry for STT_FUNC and + STT_GNU_IFUNC type symbol. */ case R_LARCH_PCALA_HI20: - if (h != NULL) + if (h != NULL && (STT_FUNC == h->type || STT_GNU_IFUNC == h->type)) { /* For pcalau12i + jirl. */ h->needs_plt = 1; |