include, libctf: header and soname changes for CTFv4

These changes bump the current file format version to CTF_VERSION_4, and
introduce a new VERSION_5 identical with it to get the version integer and
the name identical again.  A great many changes are made to account for
the changes to handle CTFv4 (which is a BTF superset).

libctf will not compile after these changes, which is why it's been diked
out of the build system and forced-off until the series is complete.

Because all the CTF_K constants have changed values, this is necessarily an
ABI break: add a #define to make picking up this break at compile time
obvious.

Note that the ABI has broken by bumping the soname (deriving it now from
libctf/libtool-version) and folding all newer symbols in the symbol version
file into a new LIBCTF_2.0 version, which is now the only exported version.
This commit is contained in:
Nick Alcock
2025-04-24 13:20:53 +01:00
parent 13ce9e17b7
commit de5a31a8ca
6 changed files with 411 additions and 156 deletions

30
libctf/libtool-version Normal file
View File

@@ -0,0 +1,30 @@
# This file is used to maintain libtool version info for libctf. See
# the libtool manual to understand the meaning of the fields. This is
# a separate file so that version updates don't involve re-running
# automake.
#
# Here are a set of rules to help you update your library version
# information:
#
# 1. Start with version information of `0:0:0' for each libtool library.
#
# 2. Update the version information only immediately before a public
# release of your software. More frequent updates are unnecessary,
# and only guarantee that the current interface number gets larger
# faster.
#
# 3. If the library source code has changed at all since the last
# update, then increment revision (`c:r:a' becomes `c:r+1:a').
#
# 4. If any interfaces have been added, removed, or changed since the
# last update, increment current, and set revision to 0.
#
# 5. Increase the age value only if the changes made to the ABI are backward
# compatible.
# a. If any interfaces have been added since the last public release,
# then increment age.
# b. If any interfaces have been removed since the last public release,
# then set age to 0.
#
# CURRENT:REVISION:AGE
1:0:0