binutils Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
binutils

Ld: Remove obsolete flag check_relocs_after_open_input.

Removes the `check_relocs_after_open_input` flag, as it's no longer needed after commit 5c3261b0e834.

The check_relocs_after_open_input flag in the linker’s bfd_link_info struct is no longer necessary after commit 5c3261b0e834. This commit removes the flag and cleans up the code that used it in several linker emulation templates and in ldlang.c. This simplifies the linker’s internal state and removes dead code.

In Details

The check_relocs_after_open_input flag in bfdlink.h controlled whether relocation checks were performed after all input files had been opened. Commit 5c3261b0e834 obviated the need for this flag. This commit removes the flag from bfd_link_info and updates affected emulation templates (aarch64elf.em, armelf.em, elf.em, scoreelf.em, mmix-elfnmmo.em, mmixelf.em) and ldlang.c.

For Context

The binutils ld linker combines object files and libraries into an executable. Linking involves processing relocation information, which specifies how addresses within the code and data need to be adjusted. This commit removes an internal flag related to when relocation checks are performed during the linking process. The flag is no longer needed due to prior changes, so removing it simplifies the linker's code.

Filed Under: linkerrelocationrefactorbinutils