RISC-V: Error for relaxable branch in absolute section.
authorJim Wilson <jimw@sifive.com>
Thu, 24 Sep 2020 22:08:52 +0000 (15:08 -0700)
committerJim Wilson <jimw@sifive.com>
Thu, 24 Sep 2020 22:16:54 +0000 (15:16 -0700)
commit743f5cfc006375655a20f255d25f6b8e1452b30b
tree52077e2ffb5526aaa4b3831554c98a69797309b1
parentdebd1a62c4d250a6257e9018d9f9c7355edcdf8b
RISC-V: Error for relaxable branch in absolute section.

Emit an error instead of crashing in frag_new, handling this same as the
i386 port.

gas/
PR 26400
* config/tc-riscv.c (append_insn): If in absolute section, emit
error before add_relaxed_insn call.
* testsuite/gas/riscv/absolute-sec.d: New.
* testsuite/gas/riscv/absolute-sec.l: New.
* testsuite/gas/riscv/absolute-sec.s: New.
gas/ChangeLog
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/absolute-sec.d [new file with mode: 0644]
gas/testsuite/gas/riscv/absolute-sec.l [new file with mode: 0644]
gas/testsuite/gas/riscv/absolute-sec.s [new file with mode: 0644]