Re: [PATCH v2] microblaze: add BFD_RELOC_8 and BFD_RELOC_16 cases

Project / Subsystem

binutils / microblaze

Date

2026-09-22

Proposer

Michael Eager <eager@eagerm.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Expands the switch statement in `md_apply_fix` to handle more relocation types.
  • • Fixes two test cases and improves the robustness of the MicroBlaze backend.

All attributes

project
binutils
subsystem
microblaze
patch_id
—
discussion_id
ba523c30-1c30-4428-92f4-d73fd0300350@eagerm.com
source_type
public_inbox
title
Re: [PATCH v2] microblaze: add BFD_RELOC_8 and BFD_RELOC_16 cases
headline
microblaze: add BFD_RELOC_8 and BFD_RELOC_16 cases
tldr
Adds support for 8-bit and 16-bit relocations in MicroBlaze's `md_apply_fix` function.
proposer
Michael Eager <eager@eagerm.com>
consensus
Proposed
outcome
ready
sentiment_score
—
technical_tradeoffs
  • • Expands the switch statement in `md_apply_fix` to handle more relocation types.
  • • Fixes two test cases and improves the robustness of the MicroBlaze backend.
series_id
—
series_role
cover
series_parts
[]
tags
  • • microblaze
  • • gas
  • • relocation
  • • fixup
bugzilla_url
—
date
2026-09-22T00:00:00.000Z

Re: [PATCH v2] microblaze: add BFD_RELOC_8 and BFD_RELOC_16 cases

This patch addresses an issue in the MicroBlaze backend where the md_apply_fix function lacked cases for BFD_RELOC_8 and BFD_RELOC_16. Without these cases, byte or halfword values known only at fixup time were being assembled as zero, and the subsequent relocation resolution would turn them into BFD_RELOC_NONE, preventing the linker from correcting them. The fix adds these cases, replicating the logic for BFD_RELOC_32 but for smaller data sizes, thereby fixing the gas/all/simple-forward testcase and un-xfailing gas/all/forward.