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

Binutils BFD adds relaxation deletion range checks to 13 ELF backends.

Multiple ELF backends now validate relaxation deletion ranges to prevent underflows, with new shared test helpers and regression tests.

This change introduces validation for relaxation deletion ranges in thirteen simple ELF backends within the BFD library. It utilizes _bfd_elf_relax_delete_range_ok to ensure the integrity of deletion operations, preventing potential memory corruption. New shared test helpers and regression tests for CRX and H8/300 architectures are added to verify these checks.

In Details

This commit broadens the scope of relaxation underflow prevention, previously seen in RISC-V, to thirteen additional ELF backends (CR16, CRX, FT32, H8/300, IP2K, M10200, M10300, M32C, MIPS, MSP430, PRU, SH, and V850). Each backend now incorporates a check using _bfd_elf_relax_delete_range_ok before performing memmove operations during relaxation. Shared test infrastructure in ld/testsuite/lib/ld-lib.exp is introduced to support these and other relaxation tests, along with new DejaGnu tests for CRX and H8/300.

Filed Under: linkerbfdrelaxation