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

bfd/x86-64: Support COFF relocation type R_AMD64_ABS

Adds support for the R_AMD64_ABS relocation type in the x86-64 COFF backend, analogous to ELF's NONE relocations.

This commit extends the BFD x86-64 COFF backend to support the R_AMD64_ABS relocation type. This type is equivalent to the R_X86_64_NONE relocation in the ELF format and is also recognized in the Windows world as IMAGE_REL_AMD64_ABSOLUTE. By adding support for this relocation type, the backend becomes more compliant and can handle a wider range of object files.

In Details

The bfd/coff-x86_64.c file lacked explicit handling for the R_AMD64_ABS relocation type, which has a value of 0. This commit adds an entry for R_AMD64_ABS to the howto_table and maps BFD_RELOC_NONE to it in coff_amd64_reloc_type_lookup. The in_reloc_p function is also updated to correctly identify R_AMD64_ABS as a non-relocating type. This aligns the x86-64 COFF backend with the handling of similar 'none' relocation types in ELF and Windows PE formats.

For Context
BFD
Binary File Descriptor library, an abstraction layer within GNU Binutils for handling various executable and object file formats.
x86-64
A 64-bit common processor architecture, widely used in modern computers.
COFF
Common Object File Format, an older object file format that PE (Portable Executable) format for Windows is based upon.
Relocation
Information in an object file that tells the linker how to modify code or data addresses when combining object files into an executable or shared library.
R_AMD64_ABS
A specific relocation type for the x86-64 architecture in the COFF format, similar to ELF's R_X86_64_NONE, indicating no address modification is needed.
ELF
Executable and Linkable Format, a standard file format for executables, object code, shared libraries, and core dumps on many Unix-like systems.
Filed Under: binutilsbfdx86-64coffrelocation