binutils Newspaper
JULY 29, 2026
binutils Proposed

Emit fewer relocations for linker relaxation

Series aims to reduce relocation emissions during linker relaxation on LoongArch.

This series introduces changes to the LoongArch backend for the GNU linker, aiming to reduce the number of relocations generated during the linker relaxation process. By optimizing relocation handling for label subtraction and alignment, the changes seek to improve code density and potentially performance. The series contains four patches, with the first addressing TLS descriptor relocation sizes.

In Details

This series targets the GNU linker's relaxation capabilities for the LoongArch architecture. It refactors gas/config/tc-loongarch.c and related files to emit fewer relocations by optimizing how symbolic addresses and alignment requirements are handled. Specifically, it addresses TLS descriptor relocations and conditions under which subtractions of labels are handled to avoid unnecessary relocation entries.

Filed Under: binutilslinkerLoongArchrelaxationrelocations