WEDNESDAY, OCTOBER 7, 2026
cobol
libgcobol: Establish symbol versioning
The libgcobol library now uses symbol versioning for its shared objects.
This commit establishes symbol versioning for the libgcobol shared libraries, setting a baseline of @GCOBOL_17.1. This is achieved by including version script maps in the Makefiles, which guides the linker in managing symbol versions exported by libgcobol.so, libgcobol_posix.so, and libgcobol_compat_gnu.so.
In Details
This patch introduces symbol versioning to the libgcobol shared libraries by defining version scripts (.map files) and incorporating them into the build process via Makefile.am. This establishes a stable ABI baseline (@GCOBOL_17.1) for exported symbols, allowing for future library evolution without breaking existing applications linked against older versions.
For Context
- symbol versioning
- A mechanism used in shared libraries (like
.sofiles on Linux) to allow multiple versions of a symbol (e.g., a function) to coexist. This helps maintain backward compatibility when evolving libraries without breaking existing applications. - libgcobol
- The runtime library for the GNU Cobol compiler, providing support for Cobol language features and operations.
- shared object
- A type of library file (e.g.,
.soon Linux,.dllon Windows) that contains code and data which can be loaded by multiple programs simultaneously at runtime. This reduces memory usage and allows for easier updates. - ABI
- Application Binary Interface. Defines how compiled code interacts at the binary level, including function calling conventions, data layout, and system call interfaces. A stable ABI is crucial for binary compatibility between different versions of libraries and applications.
- Makefile.am
- A file used by the Autotools build system (specifically Automake) to describe how to build software. It specifies source files, compilation rules, and dependencies.