WEDNESDAY, OCTOBER 28, 2026
binutils — Proposed
Remove unused check_relocs functions for moxie, msp, and mt
Removes no-op `check_relocs` functions for moxie, msp, and mt ELF backends as they perform no useful work.
This patch removes the check_relocs functions from the moxie, msp430, and mt ELF backends within BFD. These functions were found to do nothing and were not defined by the backend, making them redundant. Their removal simplifies the codebase by eliminating dead code.
In Details
The elf_backend_check_relocs hook is intended for backends to perform validation on relocation entries before linking. For the moxie, msp430, and mt targets, these functions were either empty stubs or conditionally defined such that they never executed their logic. This patch removes these now-dead functions, cleaning up the BFD ELF backend implementation.
For Context
- BFD
- Binary File Descriptor library, a low-level interface used by binutils for manipulating object files.
- ELF backend
- A module within BFD that handles the specifics of the ELF object file format for a particular target architecture.
- check_relocs
- A function within an ELF backend responsible for verifying the validity of relocation entries in an object file during the linking process.
- relocation entries
- Data within an object file that specifies how to modify addresses in code or data when the object is linked, especially for position-independent code.