https://sourceware.org/bugzilla/show_bug.cgi?id=30259
Bug ID: 30259 Summary: RISC-V: Assertion failed when trying to link from "code" section Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: palmer at gcc dot gnu.org Target Milestone: --- I'm chasing down an internal user's bug report and stumbled into an LD assertion. I haven't looked any further, but figured I'd write it up here so I don't forget about it. The actual code is kind of wacky (see the ".section code"), but we should at least provide a readable error message. $ cat test.s && riscv64-unknown-linux-gnu-gcc test.s -o test -nostdlib -fPIE && riscv64-unknown-linux-gnu-objdump -d test .text .global _start _start: j head .section code head: la t0, _exit_here _exit_here: ret /usr/libexec/gcc/riscv64-unknown-linux-gnu/ld: BFD (Gentoo 2.40 p2) 2.40.0 assertion fail elfnn-riscv.c:2358 collect2: fatal error: ld terminated with signal 11 [Segmentation fault] compilation terminated. -- You are receiving this mail because: You are on the CC list for the bug.