binutils Newspaper
OCTOBER 6, 2026
alpha — Proposed

alpha: allocate R_ALPHA_IRELATIVE

Define the R_ALPHA_IRELATIVE relocation type for the Alpha architecture.

This patch introduces the R_ALPHA_IRELATIVE relocation type for the Alpha architecture, assigning it the value 42. This relocation is crucial for dynamic linking and static executables, as it allows the dynamic linker or C library startup code to execute an IFUNC’s resolver and store the returned address. The patch also adds the necessary entry to the BFD relocation map and defines the relocation’s class, preparing for linker support that will generate this relocation.

In Details

This patch allocates and defines the R_ALPHA_IRELATIVE relocation type for the Alpha ELF target. This relocation is specifically designed for IFUNCs (Indirect Functions), enabling the dynamic linker or C library startup code to resolve the IFUNC's target address at runtime and update a 64-bit field with it. The patch assigns it the next available relocation number (42) and integrates it into the BFD relocation mapping, aligning with similar definitions in other targets and a corresponding glibc change.

For Context
R_ALPHA_IRELATIVE
An Alpha ELF relocation type used in dynamic linking to calculate the final address of a symbol by adding the load address of the shared object to the symbol's addend. For IFUNCs, it stores the address returned by the resolver.
IFUNC
Indirect Function. A mechanism allowing a symbol to resolve to different function implementations at runtime, typically chosen by a resolver function. Similar to a function pointer but resolved at link or load time.
dynamic linking
The process where the operating system or a dynamic linker resolves external references and loads shared libraries at runtime.
static executable
An executable file that contains all necessary library code within itself, not requiring separate shared libraries to run.
BFD
Binary File Descriptor. A library used by GNU Binutils to provide a generic interface to various executable file formats.
Filed Under: alphalinkerrelocationifuncdynamic linking