binutils Newspaper
OCTOBER 6, 2026
alpha — Proposed

alpha: reject an IFUNC address in read-only data in a static link

Prevent linker errors by rejecting IFUNC addresses in read-only data for static alpha executables.

This patch addresses an issue where IFUNC addresses in read-only data can cause problems in statically linked alpha executables. The relocation of a read-only page for such an address is problematic because the C library’s startup code cannot make it writable after the kernel has mapped the segment. Instead of relying on other targets that provide a PLT stub address, this patch proposes reporting an error for the alpha architecture, which lacks a PLT entry for non-dynamic functions.

In Details

This patch modifies the alpha ELF linker to reject IFUNC references within read-only data sections when creating a static executable. IFUNCs require an R_ALPHA_IRELATIVE relocation, which effectively attempts to relocate read-only memory. This conflicts with the execution environment of static binaries where the C library's startup code cannot modify read-only segments. The proposed solution is to emit an error, similar to how other targets might provide a PLT stub address.

Filed Under: alphalinkerifuncrelocationstatic executable