]> git.baikalelectronics.ru Git - kernel.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)
commit2c32432bec0568f9a7ad07d13056ac104b022179
treecf7663d2962d5e78e4bd2cd6f7f9f09da1964086
parent48842fcfe939502e967aa13fbf1d6c060595fa8a
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