bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/31432] New: LD: RISCV: segfault when discard section for non-con


From: alexey.lapshin at espressif dot com
Subject: [Bug ld/31432] New: LD: RISCV: segfault when discard section for non-contiguous-regions
Date: Wed, 28 Feb 2024 20:49:50 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31432

            Bug ID: 31432
           Summary: LD: RISCV: segfault when discard section for
                    non-contiguous-regions
           Product: binutils
           Version: 2.41
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: alexey.lapshin at espressif dot com
  Target Milestone: ---

Created attachment 15383
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15383&action=edit
Sources for reproduce

To reproduce run with files in the attached archive:

riscv32-esp-elf-as non-contiguous-riscv.s -o  non-contiguous-riscv.o
riscv32-esp-elf-ld --enable-non-contiguous-regions -T non-contiguous-riscv.ld
non-contiguous-riscv.o

Segfault will happen here:
https://github.com/bminor/binutils-gdb/blob/binutils-2_41-release/bfd/elfnn-riscv.c#L5207
 


The attached patch fixes my issue.

I wonder why multiple segments "overflow" (not overflow technically) are just
warnings that even should be enabled with a special option
--enable-non-contiguous-regions-warnings. However, a segment overflow leads to
exit with error code...

-- 
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]