A repository that collects libc ABI files for multiple versions and provides tools to combine them into one data set.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alex Rønne Petersen dfb74cb706
update to Zig 0.17.1
2026-11-03 21:05:36 +01:00
.forgejo/workflows ci: remove permissions field 2026-07-16 23:50:41 +02:00
freebsd freebsd: consolidate: remove dead const 2026-10-21 10:28:01 +02:00
glibc update to Zig 0.17.0 2026-10-02 05:18:04 +02:00
musl musl: consolidate: remove dead const 2026-10-21 10:28:01 +02:00
netbsd update to Zig 0.17.0 2026-10-02 05:18:04 +02:00
openbsd openbsd: add 8.0 abilists 2026-10-21 10:28:01 +02:00
serenity update to Zig 0.17.0 2026-10-02 05:18:04 +02:00
.gitignore update .gitignore 2026-01-26 20:28:48 +01:00
build.zig update to Zig 0.17.0 2026-10-02 05:18:04 +02:00
build.zig.zon update to Zig 0.17.1 2026-11-03 21:05:36 +01:00
LICENSE LICENSE: No year range. 2025-05-08 15:32:03 +02:00
list.zig update to Zig 0.16 2026-04-17 01:44:16 +01:00
README.md README: update list.zig invocation 2026-01-31 10:51:15 +01:00

libc ABI tools

This repository contains a collection of tools to be used by Zig maintainers to generate abilists files for various libc implementations; Zig users have no direct use for this repository.

An abilists file can be used by the Zig compiler to generate an accurate stub shared library when dynamically linking libc in cross-compilation scenarios. The generated abilists files are shipped with the Zig compiler, so an effort is made to keep them compact.

Currently supported libcs:

abilists binary format

All integers are stored little-endian.

  • u8 number of libc libraries. For each:
    • null-terminated name, e.g. "c\x00", "m\x00", "dl\x00", "pthread\x00"
  • u8 number of libc versions, sorted ascending. For each:
    • u8 major
    • u8 minor
    • u8 patch
  • u8 number of targets. For each:
    • null-terminated target string, e.g. "arm-linux-gnueabi\x00"
  • u16 number of function inclusions
    • null-terminated symbol name (not repeated for subsequent same symbol inclusions)
    • Set of Function Inclusions
  • u16 number of object inclusions
    • null-terminated symbol name (not repeated for subsequent same symbol inclusions)
    • Set of Object Inclusions
  • u16 number of TLS inclusions
    • null-terminated symbol name (not repeated for subsequent same symbol inclusions)
    • Set of TLS Inclusions

Set of Function Inclusions:

  • uleb128 (u64) set of targets this inclusion applies to (1 << INDEX_IN_TARGET_LIST)
  • u8 index of libc library this inclusion applies to
    • unversioned is indicated if 1 << 5 bit is set in library index
    • weak linkage is indicated if 1 << 6 bit is set in library index
    • last inclusion is indicated if 1 << 7 bit is set in library index
  • [N]u8 set of libc versions this inclusion applies to
    • last version index is indicated if 1 << 7 bit is set in version index

Set of Object Inclusions:

  • uleb128 (u64) set of targets this inclusion applies to (1 << INDEX_IN_TARGET_LIST)
  • uleb128 (u16) object size
  • u8 index of libc library this inclusion applies to
    • unversioned is indicated if 1 << 5 bit is set in library index
    • weak linkage is indicated if 1 << 6 bit is set in library index
    • last inclusion is indicated if 1 << 7 bit is set in library index
  • [N]u8 set of libc versions this inclusion applies to
    • last version index is indicated if 1 << 7 bit is set in version index

Set of TLS Inclusions:

  • uleb128 (u64) set of targets this inclusion applies to (1 << INDEX_IN_TARGET_LIST)
  • uleb128 (u16) object size
  • u8 index of libc library this inclusion applies to
    • unversioned is indicated if 1 << 5 bit is set in library index
    • weak linkage is indicated if 1 << 6 bit is set in library index
    • last inclusion is indicated if 1 << 7 bit is set in library index
  • [N]u8 set of libc versions this inclusion applies to
    • last version index is indicated if 1 << 7 bit is set in version index

Debugging an abilists file

zig build list -- abilists