binutils-gdb/ld/testsuite/ld-riscv-elf/pcrel-lo-addend.d
Jim Wilson 2a0d985349 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.
2018-02-15 10:53:46 -08:00

6 lines
151 B
Makefile

#name: %pcrel_lo with an addend
#source: pcrel-lo-addend.s
#as: -march=rv32ic
#ld: -melf32lriscv
#error: .*dangerous relocation: %pcrel_lo with addend