This directory contains .abilist files from SerenityOS libc. These files are
consolidated to generate a single 14 KB symbol mapping file that is shipped with
Zig to target SerenityOS.
Unlike glibc, these .abilist files are generated by inspecting
the actual libc.so ELF file. We do it this way because SerenityOS does not
have .abilist files for its libc, and in fact does not use symbol versioning
at all.
As SerenityOS does not have tagged releases, we only track master. We are
currently on commit 5309310552e59cbd5ca2d306ae6b869551685b5c.
-
Follow these instructions.
-
Make sure that
archesis up to date. -
Run the tool to generate the new
.abilistfiles:zig run collect.zig -- $SERENITYOS_SYSROOT_PATHWhere
SERENITYOS_SYSROOT_PATHcontainsaarch64,x86_64, etc directories.Pay attention to any warnings printed; make adjustments as necessary, e.g. to
blacklist. -
This inspects the ELF shared libraries for each target you built earlier and generates
.abilistfiles namespaced under the version number. -
Inspect the changes and then commit these new files into Git.
-
Make sure that
zig_targetsis up to date. -
Run
consolidate.zigin this directory.zig run consolidate.zig
This will generate the file abilists which you can then inspect and make sure
it is OK. Copy it to $ZIG_GIT_REPO_PATH/lib/libc/serenity/abilists.
Compared to glibc, the .abilist files here have some differences:
- The first field containing the version name is missing because SerenityOS does not use symbol versioning.
- There can be an extra field containing a
Wbefore the category field. If present, this indicates that the symbol has weak linkage.