libbpf: Extract internal set-of-strings datastructure APIs
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 18 Mar 2021 19:40:28 +0000 (12:40 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 18 Mar 2021 23:14:22 +0000 (16:14 -0700)
commit90d76d3ececc74bf43b2a97f178dadfa1e52be54
tree8efd86b33ebb93bc89683b9a3410f3bcc6219e24
parent3b029e06f624efa90c9a4354e408acf134adb185
libbpf: Extract internal set-of-strings datastructure APIs

Extract BTF logic for maintaining a set of strings data structure, used for
BTF strings section construction in writable mode, into separate re-usable
API. This data structure is going to be used by bpf_linker to maintains ELF
STRTAB section, which has the same layout as BTF strings section.

Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210318194036.3521577-5-andrii@kernel.org
tools/lib/bpf/Build
tools/lib/bpf/btf.c
tools/lib/bpf/strset.c [new file with mode: 0644]
tools/lib/bpf/strset.h [new file with mode: 0644]