bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/30259] New: RISC-V: Assertion failed when trying to link from "c


From: palmer at gcc dot gnu.org
Subject: [Bug ld/30259] New: RISC-V: Assertion failed when trying to link from "code" section
Date: Tue, 21 Mar 2023 18:10:25 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]