]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tools/libbpf: support bigger BTF data sizes
authorAndrii Nakryiko <andriin@fb.com>
Sat, 16 Feb 2019 03:52:18 +0000 (19:52 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 17 Feb 2019 02:47:18 +0000 (18:47 -0800)
commit5aab392c55c96f9bb26d9294f965f156a87ee81c
treecf7663d2962d5e78e4bd2cd6f7f9f09da1964086
parent9d6b3584a7a9d7fa872cb17ceda7a3b208f441eb
tools/libbpf: support bigger BTF data sizes

While it's understandable why kernel limits number of BTF types to 65535
and size of string section to 64KB, in libbpf as user-space library it's
too restrictive. E.g., pahole converting DWARF to BTF type information
for Linux kernel generates more than 3 million BTF types and more than
3MB of strings, before deduplication. So to allow btf__dedup() to do its
work, we need to be able to load bigger BTF sections using btf__new().

Singed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/btf.c