[PATCH] riscv: Ignore attributes in empty input file

H.J. Lu hjl.tools@gmail.com
Thu May 28 09:29:10 GMT 2026


Ignore empty and .note.gnu.build-id sections when merging attributes.
The following linker tests now pass for riscv:

FAIL: Diagnostics - Wrong magic number mixed with valid CTF sections
FAIL: --gc-sections with --defsym
FAIL: --gc-sections with KEEP
FAIL: --gc-sections with __start_SECTIONNAME
FAIL: ld-plugin/lto-10r
FAIL: ld-plugin/lto-3r
FAIL: ld-plugin/lto-4r-a
FAIL: ld-plugin/lto-4r-b
FAIL: ld-plugin/lto-4r-c
FAIL: ld-plugin/lto-4r-d
FAIL: ld-plugin/lto-5r
FAIL: PR ld/19317 (2)
FAIL: PR ld/19317 (3)

PR ld/34185
* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Ignore
attributes in empty input file


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-riscv-Ignore-attributes-in-empty-input-file.patch
Type: text/x-patch
Size: 2188 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260528/4f67424b/attachment.bin>


More information about the Binutils mailing list