MONDAY, OCTOBER 19, 2026
cobol
COBOL: Incorporate RUNPATH tags into gcobol-generated executables.
gcobol executables now use RUNPATH tags for locating shared libraries.
GCC’s COBOL compiler now incorporates RUNPATH tags into generated executables, improving how they locate required shared libraries at runtime. This change provides a more robust mechanism for dynamic library resolution compared to older methods.
In Details
This commit updates the gcobolspec.cc and related spec files (libgcobol.spec.in) to use RUNPATH tags for dynamic library loading in gcobol-generated executables. It modifies driver-specific logic to adjust libgcobol.spec and also updates configure.ac and Makefile logic within libgcobol to support this. A new mk-rpath-spec.sh script and README.runpath are introduced to manage this functionality.
For Context
- RUNPATH
- A dynamic linking tag embedded in an executable or shared library that specifies directories to search for runtime dependencies (shared libraries). It is processed before LD_LIBRARY_PATH and is generally preferred over RUNPATH.
- gcobol
- The GNU COBOL compiler, part of the GCC project, used to compile COBOL programs.
- shared library
- A library that can be loaded and used by multiple programs simultaneously, saving memory and disk space.
- dynamic linking
- A process in which executable code is linked against shared libraries at runtime, rather than at compile time.
- spec file
- A configuration file used by the linker (ld) to define library search paths and other linking behavior.