LoongArch: ld: Fix bug not generate plt when link a dso
authorliuzhensong <liuzhensong@loongson.cn>
Fri, 19 Aug 2022 07:04:45 +0000 (15:04 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Wed, 24 Aug 2022 06:27:03 +0000 (14:27 +0800)
commit42bd5254fb5f52f045796e1d9cce07102881d3b1
tree32613c1472e87894f69dd3aaae41a1bcab95a94b
parent044193ebf6a2197a36c75cbc1ec7e77440a37b26
LoongArch: ld: Fix bug not generate plt when link a dso

  Fix the bug that can not generate func@plt
  when linking a undefined function with cmodel=medium.
  Add testcase.

  bfd/
    * elfnn-loongarch.c
  ld/testsuite/ld-loongarch-elf/
    * cmodel-libjirl.dd
    * cmodel.exp
    * libjirl.s
bfd/elfnn-loongarch.c
ld/testsuite/ld-loongarch-elf/cmodel-libjirl.dd [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/cmodel.exp [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/libjirl.s [new file with mode: 0644]