]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: move string deduplication into ctf-archive
authorNick Alcock <nick.alcock@oracle.com>
Sun, 16 Feb 2025 19:39:41 +0000 (19:39 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 28 Feb 2025 15:13:24 +0000 (15:13 +0000)
commitbeccf36b88069571698d9f0c51055b3aaee4a380
treed7db3d64a2f0f5f0f27404dd142944aa62f4e829
parent06f77d49f62ff039d5fbd45afd259678455b448b
libctf: move string deduplication into ctf-archive

This means that any archive containing dicts can get its strings dedupped
together, rather than only those that are ctf_linked.

(For now, we are still constrained to ctf_linked archives, since fixing that
requires further changes to ctf_dedup_strings: but this gives us the first
half of what is necessary.)

libctf/
* ctf-link.c (ctf_link_write): Move string dedup into...
* ctf-archive.c (ctf_arc_preserialize): ... this new function.
(ctf_arc_write_fd): Call it.
libctf/ctf-api.c
libctf/ctf-archive.c
libctf/ctf-impl.h
libctf/ctf-link.c