RISC-V: Give error for ignored pcrel_lo addend.
authorJim Wilson <jimw@sifive.com>
Thu, 15 Feb 2018 18:53:46 +0000 (10:53 -0800)
committerJim Wilson <jimw@sifive.com>
Thu, 15 Feb 2018 18:53:46 +0000 (10:53 -0800)
commit2a0d98534964649bc6884b7833c6c4089159a6df
treef6e5caa134ac16c4d58efa8ae98f7f67f0266b06
parent49ded53def53ae60926433b924db9525aae1e631
RISC-V: Give error for ignored pcrel_lo addend.

bfd/
* elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
when pcrel_lo reloc has an addend.  Use reloc_dangerous callback for
bfd_reloc_dangerous.  Use einfo instead of warning callback for errors.
Add %X%P to error messages.

ld/
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run pcrel-lo-addend test.
* testsuite/ld-riscv-elf/pcrel-lo-addend.d: New.
* testsuite/ld-riscv-elf/pcrel-lo-addend.s: New.
bfd/ChangeLog
bfd/elfnn-riscv.c
ld/ChangeLog
ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
ld/testsuite/ld-riscv-elf/pcrel-lo-addend.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/pcrel-lo-addend.s [new file with mode: 0644]