binutils Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
bfd/elf

bfd/ELF: Correct relocations for FRV and LM32 GOTOFF

Fixes incorrect relocation definitions for frv and lm32 GOTOFF instructions.

This commit corrects the relocation type definitions for GOTOFF instructions on the FRV and LM32 architectures. The previous definitions were incorrect and could lead to build failures if generated opcode files were regenerated.

In Details

This change rectifies incorrect mappings between symbolic expression parse trees and ELF relocation types in the CGEN opcode descriptions for FRV and LM32. Specifically, it replaces architecture-specific BFD_RELOC_FRV_GOTOFFHI/LO/L and BFD_RELOC_LM32_GOTOFF_HI16/LO16 with generalized forms like BFD_RELOC_HI16_GOTOFF and BFD_RELOC_LO16_GOTOFF. This resolves a build breakage scenario when opcode files are regenerated from macro definitions.

For Context
BFD
The Binary File Descriptor library, a core component of GNU Binutils that provides an abstraction for handling various object file formats.
ELF
Executable and Linkable Format, a common standard file format for object files, executables, and shared libraries on many Unix-like systems.
GOTOFF
An instruction or relocation type related to accessing Global Offset Table (GOT) entries for PC-relative addressing.
Relocation
A process performed by the linker to resolve symbolic references and adjust addresses in an object file so that it can be combined with other object files into a final executable or library.
CGEN
A tool used within binutils-gdb for generating instruction set descriptions and related code from a machine description.
Filed Under: binutilsrelocationfrvlm32elf