[PATCH v2 1/1] ld: microblaze: don't index the local symbol cache
Project / Subsystem
binutils / ld
Date
2026-08-13
Proposer
Samuel Price <thesamprice@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Fixes an out-of-bounds read that silently corrupts relocation addends, preventing miscompilations.
- • Introduces new tests to ensure addend survival during relaxation.
- • The fix is detected by ASan in specific test cases, highlighting its importance for memory safety.
All attributes
- project
- binutils
- subsystem
- ld
- patch_id
- —
- discussion_id
- 20260813021826.84333-1-thesamprice@gmail.com
- source_type
- public_inbox
- title
- [PATCH v2 1/1] ld: microblaze: don't index the local symbol cache
- headline
- ld: microblaze: don't index the local symbol cache
- tldr
- Adds a missing bounds check to microblaze ELF relaxation to prevent an out-of-bounds read that corrupts relocation addends.
- proposer
- Samuel Price <thesamprice@gmail.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Fixes an out-of-bounds read that silently corrupts relocation addends, preventing miscompilations.
- • Introduces new tests to ensure addend survival during relaxation.
- • The fix is detected by ASan in specific test cases, highlighting its importance for memory safety.
- series_id
- binutils:ld: microblaze: don't index the local symbol cache
- series_role
- reply
- series_parts
- []
- tags
-
- • binutils
- • linker
- • microblaze
- • elf
- • relocations
- bugzilla_url
- —
- date
- 2026-08-13T00:00:00.000Z
[PATCH v2 1/1] ld: microblaze: don't index the local symbol cache
This patch series addresses a silent miscompilation in the microblaze target by fixing an out-of-bounds read in ld’s microblaze_elf_relax_section function. The issue arises from a copied function missing a bounds check, leading to incorrect relocation addend adjustments when scanning global symbols. The fix reapplies the missing guard, preventing corruption that affected structure member accesses. It also introduces new tests to verify addend survival during relaxation, with ASan builds catching the error in a test specifically designed for .eh_frame editing.