binutils Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
binutils/x86

Linker errors out on failure to create TLS relocation section.

Linker now uses fatal error for TLS relocation section creation failure, improving diagnostics.

The x86 ELF linker will now report a fatal error if it fails to create or align the Thread Local Storage (TLS) relocation section (.rel.tls/.rela.tls). Previously, such failures returned false, masking the problem and causing subsequent steps like PLT and unwind information setup to be skipped without diagnostic messages. This change ensures that build failures related to TLS setup are properly reported.

In Details

In _bfd_x86_elf_link_setup_gnu_properties, failures to create or align the TLS relocation sections ('.rel.tls' or '.rela.tls') previously returned false. This was interpreted by the caller as no input with GNU properties being found, leading to skipped PLT and unwind information setup without a diagnostic. This commit changes the behavior to call info->callbacks->fatal instead, providing a clear error message and halting the link process, consistent with other section-creation failure handling in the function.

For Context
TLS
Thread Local Storage. A memory management feature that allows each thread in a process to have its own copy of a variable, ensuring data isolation between threads.
Relocation section
An ELF section (e.g., .rel.text, .rela.dyn) that contains information the linker needs to adjust addresses in the code or data sections of an object file or executable. These adjustments are necessary to correctly link different parts of a program or libraries.
ELF
Executable and Linkable Format. A standard file format for object files, executables, and shared libraries on many Unix-like systems, including Linux.
GNU properties
A section within an ELF file that can store various properties and metadata used by GNU tools, such as linker scripts, symbol information, or relocation details.
PLT
Procedure Linkage Table. A table used in dynamically linked executables and shared libraries to resolve symbols at runtime. It acts as an intermediary between the program code and the dynamic linker.
Filed Under: binutilslinkerx86ELFTLS