[PATCH v1 1/1] ld: microblaze: don't index the local symbol cache with a global symbol index

Project / Subsystem

binutils / ld

Date

2026-08-10

Proposer

Neal Frager <neal.frager@amd.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Adds a small performance overhead to the `microblaze_elf_relax_section` function due to the added bounds check.
  • • Fixes a silent miscompilation bug, improving code correctness and reliability for the microblaze target.

All attributes

project
binutils
subsystem
ld
patch_id
—
discussion_id
20260810060011.4186926-1-neal.frager@amd.com
source_type
public_inbox
title
[PATCH v1 1/1] ld: microblaze: don't index the local symbol cache with a global symbol index
headline
ld: microblaze: don't index the local symbol cache with a global symbol index
tldr
Fix an out-of-bounds read in microblaze ELF relaxation that silently corrupts relocation addends.
proposer
Neal Frager <neal.frager@amd.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Adds a small performance overhead to the `microblaze_elf_relax_section` function due to the added bounds check.
  • • Fixes a silent miscompilation bug, improving code correctness and reliability for the microblaze target.
series_id
binutils:ld: microblaze: don't index the local symbol cache with a global symbol index
series_role
reply
series_parts
[]
tags
  • • binutils
  • • ld
  • • microblaze
  • • ELF
  • • relaxation
bugzilla_url
—
date
2026-08-10T00:00:00.000Z

[PATCH v1 1/1] ld: microblaze: don't index the local symbol cache with a global symbol index

This patch addresses a bug in the microblaze ELF relaxation code where an out-of-bounds read can corrupt relocation addends, leading to silent miscompilations. The issue arises from indexing a local symbol cache with a global symbol index without proper bounds checking. The fix restores a missing bounds check, preventing incorrect adjustment of relocation addends and ensuring data structure accesses are compiled correctly.