binutils Newspaper
NOVEMBER 30, 2026
ia64 — Proposed

ia64: Fix .rela.got sizing for __ehdr_start during relaxation

Fixes a BFD assertion failure in the IA-64 backend when linking musl libc due to incorrect .rela.got section sizing.

This patch addresses a BFD assertion failure in the IA-64 backend related to the sizing of the .rela.got section when processing the __ehdr_start symbol during relaxation. This issue was encountered while porting musl to IA-64. The fix adjusts the symbol state management to resolve a mismatch between different sizing passes, enabling a successful dynamic build of musl for IA-64. The patch was tested on real hardware.

In Details

The IA-64 ELF backend in binutils' BFD library experiences an assertion failure (elfnn-ia64.c:3238) during the linking of dynamic libraries, specifically when handling the linker-defined symbol __ehdr_start. This is caused by an undersized .rela.got section due to a discrepancy in how symbol states are managed across different sizing passes within the relaxation process. The patch aims to synchronize these states to ensure correct .rela.got section sizing.

For Context
IA-64
Intel's 64-bit instruction set architecture, also known as Itanium.
.rela.got
A section in an ELF object file that contains relocation entries for the Global Offset Table (GOT), used for dynamic linking.
__ehdr_start
A linker-defined symbol that typically points to the beginning of the ELF header in an executable or shared library.
Relaxation
A linking process where the linker adjusts addresses and offsets of instructions and data after initial assembly, often to support position-independent code or specific architectural features.
BFD
Binary File Descriptor library, used by GNU Binutils.
musl libc
A lightweight C standard library designed for embedded systems and high-performance computing.
Assertion failure
A condition detected during program execution that violates a logical assertion, often indicating a bug.
Filed Under: ia64linkerrelocationassertionmusl