]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: serialize: finish off the serializer
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:12:47 +0000 (18:12 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:12:47 +0000 (18:12 +0100)
commit3520fb4568c003b1cba32511fa25fa07e0cd3064
treeba3ef88d8d40cd338ab9ffd6133735eda39bde28
parent176afc3c8b97b66a724636b0f5ad75a8587e2729
libctf: serialize: finish off the serializer

The only remaining parts of serialization that need fixing up is
ctf_preserialize, which despite its name does nearly all the work of
serialization: the only bit it doesn't do is write the string tables
(since that has to happen across dicts after all the dicts have otherwise
been laid out, in order to deduplicate the strtabs).

As usual in this series, there's adjustment for various field name changes
(maxtypes -> ntypes, the move into ctf_serialize, etc), and extra work to
figure out whether we're emitting BTF or not and to handle the distinction
between CTF and BTF headers, and not try to emit CTF-only stuff like the
symtypetabs into BTF dicts; we can also throw out a bunch of old code that
sets compatibility flags, everything to do with forcing variables into the
dynamic state in case they changed (we're going to handle that more
generally for everything in the types table at a later date, outside
serialization), and everything to do with special handling of variables in
general.

But much of that is only a couple of lines each, and most of the changes are
mechanical: this is probably the simplest serialization commit in this
series.
libctf/ctf-serialize.c