[PATCH 12/23] aarch64: Fix ldst_lo12_determine_real_reloc_type

Project / Subsystem

binutils / aarch64

Date

2026-05-07

Proposer

Alice Carlotti <alice.carlotti@arm.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Improves error handling in `ldst_lo12_determine_real_reloc_type`.
  • Simplifies the code by inlining functionality and removing an unused function.
  • May change the behavior of `ldst_lo12_determine_real_reloc_type` in edge cases.

All attributes

project
binutils
subsystem
aarch64
patch_id
discussion_id
8d061c2f-909d-3c9f-19ab-1540666cb02a@e124511.cambridge.arm.com
source_type
public_inbox
title
[PATCH 12/23] aarch64: Fix ldst_lo12_determine_real_reloc_type
headline
Aarch64: Fix ldst_lo12_determine_real_reloc_type
tldr
Improve relocation type determination for load/store instructions and remove unused function `aarch64_get_expected_qualifier`.
proposer
Alice Carlotti <alice.carlotti@arm.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Improves error handling in `ldst_lo12_determine_real_reloc_type`.
  • Simplifies the code by inlining functionality and removing an unused function.
  • May change the behavior of `ldst_lo12_determine_real_reloc_type` in edge cases.
series_id
binutils:aarch64: fix ldst_lo12_determine_real_reloc_type
series_role
reply
series_parts
[]
tags
  • aarch64
  • assembler
  • relocation
  • load/store
  • code cleanup
bugzilla_url
date
2026-05-07T00:00:00.000Z

[PATCH 12/23] aarch64: Fix ldst_lo12_determine_real_reloc_type

This patch improves the ldst_lo12_determine_real_reloc_type function by adding fallback handling for invalid operand qualifiers, preventing assertions when encountering X registers in byte or half instructions. It also simplifies the code by inlining parts of aarch64_get_expected_qualifer and directly deducing the array index from qualifier enum values. As a result, the aarch64_get_expected_qualifier function becomes unused and is removed, simplifying the codebase.