Re: [PATCH] riscv: Ignore attributes in empty input file

Project / Subsystem

binutils / riscv

Date

2026-09-16

Proposer

H.J. Lu <hjl.tools@gmail.com>

Source type

public_inbox

Consensus

Ready to Land

Sentiment

—/10

Technical tradeoffs

  • • Improves the robustness of the RISC-V linker by correctly handling edge cases with empty files and specific sections, at the cost of minor complexity in attribute merging logic.

All attributes

project
binutils
subsystem
riscv
patch_id
—
discussion_id
CA+yXCZBSLYss8vaeBd3dvGjGi64=GSYt4H7BJKpwrQdzg26t3Q@mail.gmail.com
source_type
public_inbox
title
Re: [PATCH] riscv: Ignore attributes in empty input file
headline
riscv: Ignore attributes in empty input file
tldr
Patch accepted: RISC-V assembler now ignores attributes in empty input files.
proposer
H.J. Lu <hjl.tools@gmail.com>
consensus
Ready to Land
outcome
ready
sentiment_score
—
technical_tradeoffs
  • • Improves the robustness of the RISC-V linker by correctly handling edge cases with empty files and specific sections, at the cost of minor complexity in attribute merging logic.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • binutils
  • • risc-v
  • • linker
  • • attributes
bugzilla_url
—
date
2026-09-16T00:00:00.000Z

Re: [PATCH] riscv: Ignore attributes in empty input file

This patch addresses an issue in the RISC-V assembler where attributes in empty or .note.gnu.build-id sections were not being ignored during merging. The change modifies _bfd_riscv_elf_merge_private_bfd_data to correctly handle these cases, passing several linker test cases that previously failed. The patch has been accepted.