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

Project / Subsystem

binutils / ld/microblaze

Date

2026-08-10

Proposer

Neal Frager <neal.frager@amd.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

All attributes

project
binutils
subsystem
ld/microblaze
patch_id
—
discussion_id
20260810054841.4177591-1-neal.frager@amd.com
source_type
public_inbox
title
[PATCH] 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
Patch fixes an out-of-bounds read in microblaze ELF relaxation by adding a missing bounds check.
proposer
Neal Frager <neal.frager@amd.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
[]
series_id
—
series_role
standalone
series_parts
[]
tags
[]
bugzilla_url
—
date
2026-08-10T00:00:00.000Z

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

This patch addresses a bug in the microblaze ELF relaxation process where an out-of-bounds read could silently corrupt relocation addends. The issue stems from indexing the local symbol cache with a global symbol index without a proper bounds check, a guard that was present in the original code but dropped during a copy. The fix reintroduces this two-line guard, preventing incorrect adjustments to relocation addends and ensuring data integrity, as evidenced by passing new tests.