Re: bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*

Project / Subsystem

binutils / bfd/elf

Date

2026-07-13

Proposer

Jan Beulich <jbeulich@suse.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Consolidating relocation types simplifies the codebase but can lead to temporary build or runtime issues if not handled carefully across all affected architectures.
  • Maintaining architecture-specific code while striving for generic solutions requires careful management of dependencies and abstractions.

All attributes

project
binutils
subsystem
bfd/elf
patch_id
discussion_id
d0ab4a18-0b34-45d9-b500-38bcccd22329@suse.com
source_type
public_inbox
title
Re: bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*
headline
bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*
tldr
Fixes build breakage in frv and lm32 by updating relocation types after a previous commit refactored GOTOFF relocations.
proposer
Jan Beulich <jbeulich@suse.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Consolidating relocation types simplifies the codebase but can lead to temporary build or runtime issues if not handled carefully across all affected architectures.
  • Maintaining architecture-specific code while striving for generic solutions requires careful management of dependencies and abstractions.
series_id
series_role
reply
series_parts
[]
tags
  • binutils
  • bfd
  • elf
  • linker
  • relocation
bugzilla_url
date
2026-07-13T00:00:00.000Z

Re: bfd/ELF: fold BFD_RELOC_<arch>_GOTOFF*

Responding to a fix for build breakage in cpu/frv.opc and cpu/lm32.opc, Jan Beulich questions if the change represents a layering violation but acknowledges that other similar BFD_* usage from cpu/ might be intentional. The fix involves updating relocation types from architecture-specific BFD_RELOC_FRV_GOTOFFLO and BFD_RELOC_LM32_GOTOFF_HI16 to more generic BFD_RELOC_LO16_GOTOFF and BFD_RELOC_HI16_GOTOFF, respectively, ensuring generated files in opcodes/ can be safely regenerated.