GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Ada: Add LoongArch support to libgnat's object file reader

GCC's Ada library now supports reading object files for the LoongArch architecture.

The GNU Ada compiler’s runtime library (libgnat) has been updated to include support for the LoongArch architecture in its object file reader. This enables libgnat to correctly process and interpret object files generated for LoongArch, facilitating the use of Ada on this new platform.

In Details

The s-objrea.ads and s-objrea.adb files within GCC's libgnat component now recognize the EM_LOONGARCH ELF machine type. This involves updating the Object_Arch enumeration and handling LoongArch's specific address reading conventions in the Read_Address function, as well as integrating it into the ELF_Ops.Initialize logic. This expands libgnat's cross-architecture capabilities for object file introspection.

For Context
libgnat
The runtime library for the GNU Ada compiler (GCC), providing essential services for Ada programs, including I/O, memory management, and exception handling.
LoongArch
A family of RISC instruction set architectures developed in China, used in various computing devices.
ELF
Executable and Linkable Format, a common standard file format for object files, executables, and shared libraries on Unix-like systems.
object file reader
A component within a compiler or linker that parses and interprets the structure and contents of object files.
Filed Under: adaloongarchlibgnattarget