Landing: 97e414490477
Project / Subsystem
binutils / binutils/elf
Date
2026-10-01
Author
Kito Cheng <kito@sourceware.org>
Commit
97e4144904779d0c986670ed977d7c3fa61806b2
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- binutils/elf
- patch_id
- —
- commit_hash
- 97e4144904779d0c986670ed977d7c3fa61806b2
- source_type
- public_inbox
- headline
- RISC-V: Prevent objcopy/strip from adding attributes section
- tldr
- Fixes objcopy and strip on older LLD versions not to break binaries by adding RISC-V attributes program headers.
- author
- Kito Cheng <kito@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • risc-v
- • elf
- • objcopy
- • linker
- discussion_id_link
- public_inbox:binutils#30237
- bugzilla_pr
- —
- date
- 2026-10-01T00:00:00.000Z
This change prevents objcopy and strip from adding a PT_RISCV_ATTRIBUTES program header to RISC-V ELF files when the linker (LLD) version is older than 17. Older LLD versions do not create this header, and attempting to add it later can corrupt binaries by failing to reserve space for program headers.