ABIMAP(1)
๐ฆ abimap(1) ๐ฆ
okay bestie, welcome to the abimap(1) manual, and I need you to read the whole thing ๐
โจ NAME โจ
abimap - Generate and update linker version scripts ๐ธ
๐ SYNOPSIS ๐
abimap [-h] {update,new,check,version} ...
๐ DESCRIPTION ๐
okay so abimap is a tool that generates and updates linker scripts, and those scripts slap version info onto the symbols a shared library exports โจ it's giving organized ๐
it's meant to live inside your build process ๐ฅ it checks for changes in the set of exported symbols and updates the symbol version linker script to match. no more manually keeping track, slay ๐ญ
the complete documentation lives at https://abimap.readthedocs.io ๐ฆ
๐ OPTIONS ๐
-h,--helpโ shows you the available options and subcommands ๐
๐ SUBCOMMANDS ๐
๐ง abimap update
Updates an existing map file. Main character energy ๐
abimap update [-h] [-o OUT] [-i INPUT] [-d]
[--verbosity {quiet,error,warning,info,debug} | --quiet | --debug]
[-l LOGFILE] [-n NAME] [-v VERSION]
[-r RELEASE] [--no_guess] [--allow-abi-break]
[-f] [-a | --remove]
file
fileโ the map file being updated ๐ซถ-o OUT,--out OUTโ where the output goes (defaults to stdout) ๐-i INPUT,--in INPUTโ reads from this file instead of stdio ๐-d,--dryโ does everything, but won't touch the files at all ๐--verbosity {quiet,error,warning,info,debug}โ sets how chatty the program is โจ--quietโ makes the program quiet ๐คซ--debugโ makes the program print debug info ๐-l LOGFILE,--logfile LOGFILEโ logs everything to this file ๐-n NAME,--name NAMEโ the name of the library, likelibx๐ฆ-v VERSION,--version VERSIONโ the release version, like1_0_0or1.0.0๐-r RELEASE,--release RELEASEโ the full name of the release, likeLIBX_1_0_0๐--no_guessโ turns off the next release name guessing ๐ โโ๏ธ--allow-abi-breakโ lets you remove symbols and break the ABI. big risk, bestie ๐-f,--finalโ marks the modified release as final, so nobody can change it later ๐-a,--addโ adds the symbols to the map file โ--removeโ removes the symbols from the map file. This breaks the ABI. ๐
๐จ Heads up:--removeand--allow-abi-breakboth break the ABI. Use them with extreme care, bestie, or your users will be sad ๐ญ
๐ธ abimap new
Creates a brand new map file โจ
abimap new [-h] [-o OUT] [-i INPUT] [-d]
[--verbosity {quiet,error,warning,info,debug} | --quiet | --debug]
[-l LOGFILE] [-n NAME] [-v VERSION] [-r RELEASE]
[--no_guess] [-f]
-o OUT,--out OUTโ where the output goes (defaults to stdout) ๐-i INPUT,--in INPUTโ reads from this file instead of stdio ๐-d,--dryโ does everything, but won't modify the files ๐--verbosity {quiet,error,warning,info,debug}โ sets the program verbosity โจ--quietโ makes the program quiet ๐คซ--debugโ makes the program print debug info ๐-l LOGFILE,--logfile LOGFILEโ logs to this file ๐-n NAME,--name NAMEโ the name of the library, likelibx๐ฆ-v VERSION,--version VERSIONโ the release version, like1_0_0or1.0.0๐-r RELEASE,--release RELEASEโ the full name of the release, likeLIBX_1_0_0๐--no_guessโ turns off the next release name guessing ๐ โโ๏ธ-f,--finalโ marks the new release as final, so no later changes allowed ๐
๐ฆ abimap check
Checks the syntax of a map file. vibe check โ
abimap check [-h]
[--verbosity {quiet,error,warning,info,debug} | --quiet | --debug]
[-l LOGFILE]
file
fileโ the map file to be checked ๐ซถ--verbosity {quiet,error,warning,info,debug}โ sets the program verbosity โจ--quietโ makes the program quiet ๐คซ--debugโ makes the program print debug info ๐-l LOGFILE,--logfile LOGFILEโ logs to this file ๐
๐ abimap version
Prints the tool version number. iconic behaviour, no notes ๐
usage:
abimap version [-h]
๐ซง NOTES ๐ซง
๐ฎ Why use symbol versioning?
okay the main reason is to keep the library [ABI] stable ๐ซถ
if a library is meant to be used for a long time, it's gonna need updates for bug fixes and/or improvements ๐ ๏ธ and that can lead to changes in the [API] and, in the worst case, changes to the [ABI] ๐ญ
with symbol versioning, you can make compatible changes and keep applications working without recompiling โจ if incompatible changes happen (breaking the [ABI]), symbol versioning lets both incompatible versions live on the same system without conflict ๐ and even more uncommon situations are covered, like an application being linked to different (incompatible) versions of the same library ๐คฏ
for more info, I 100% recommend reading:
[HOW_TO]How to write shared libraries, by Ulrich Drepper ๐
๐ท How to add symbol versioning to my library?
adding version info to the symbols is easy, bestie. keeping the [ABI] stable, unfortunately, is not ๐ญ this project is here to help with the first part ๐ฆ
to add version info to a library's symbols, you can use version scripts (in Linux). version scripts are files that linkers use to map symbols to a given version. they contain the symbols exported by the library, grouped by the releases where they were introduced. for example:
LIB_EXAMPLE_1_0_0
{
global:
symbol;
another_symbol;
local:
*;
};
in this example, the release LIB_EXAMPLE_1_0_0 introduces the symbols symbol and another_symbol. the * wildcard in local catches all the other symbols, so only symbol and another_symbol are globally exported as part of the library [API] ๐
if a compatible change is made, it'd introduce a new release, like:
LIB_EXAMPLE_1_0_0
{
global:
symbol;
another_symbol;
local:
*;
};
LIB_EXAMPLE_1_1_0
{
global:
new_symbol;
} LIB_EXAMPLE_1_0_0;
the new release LIB_EXAMPLE_1_1_0 introduces the symbol new_symbol โจ the * wildcard should only be in one version, usually the oldest one ๐ and the } LIB_EXAMPLE_1_0_0; at the end of the new release means the new release depends on the old release ๐ซถ
now suppose a new incompatible version, LIB_EXAMPLE_2_0_0, gets released after LIB_EXAMPLE_1_1_0. its map would look like:
LIB_EXAMPLE_2_0_0
{
global:
a_newer_symbol;
another_symbol;
new_symbol;
local:
*;
};
the symbol symbol was removed (and that's why it was incompatible) ๐ and a new symbol, a_newer_symbol, was introduced ๐
note that all global symbols from all releases got merged into one unique new release ๐ซง
๐ References:
[ABI]https://en.wikipedia.org/wiki/Application_binary_interface๐[API]https://en.wikipedia.org/wiki/Application_programming_interface๐[HOW_TO]https://www.akkadia.org/drepper/dsohowto.pdf, How to write shared libraries by Ulrich Drepper ๐
๐ธ AUTHOR ๐ธ
Anderson Toshiyuki Sasaki <ansasaki@redhat.com> ๐
โญ COPYRIGHT โญ
2025, Anderson Toshiyuki Sasaki <ansasaki@redhat.com> ๐
that's the whole tea, bestie ๐ซถ this page is for abimap version 0.4.0, last updated Sep 19, 2025, and it's giving ABIMAP(1) forever ๐ฆโจ
๐ฆ where this page comes from
- fedora 43: python3-abimap 0.4.0-4.fc43 ยท MIT
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms