RISC-V: Handle out-of-range calls to undefined weak.
authorJim Wilson <jimw@sifive.com>
Sun, 3 Jun 2018 22:42:29 +0000 (15:42 -0700)
committerJim Wilson <jimw@sifive.com>
Sun, 3 Jun 2018 22:42:29 +0000 (15:42 -0700)
commitcf7a5066b92552b62ca4d247c241a19d1a6e599d
tree5b74f5f0143786dcfdc6afce24fd11fa0987250a
parent137b5cbd204241ec47873c353cf7e41b47182d53
RISC-V: Handle out-of-range calls to undefined weak.

bfd/
PR ld/23244
* elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
for and handle an undefined weak with no PLT.

ld/
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run new weak ref tests.
* testsuite/ld-riscv-elf/weakref.ld: New.
* testsuite/ld-riscv-elf/weakref32.d: New.
* testsuite/ld-riscv-elf/weakref32.s: New.
* testsuite/ld-riscv-elf/weakref64.d: New.
* testsuite/ld-riscv-elf/weakref64.s: New.
bfd/ChangeLog
bfd/elfnn-riscv.c
ld/ChangeLog
ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
ld/testsuite/ld-riscv-elf/weakref.ld [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/weakref32.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/weakref32.s [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/weakref64.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/weakref64.s [new file with mode: 0644]