mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-20 00:09:06 +08:00
d5fa4150f0c3a36e3ce458e1301531bd2edbf74d
* 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> * sync: latest libbpf changes from kernel Syncing latest libbpf commits from kernel repository. Baseline commit: 789f6bab849e04ea029c09b81dc8401dc0268cf9 Checkpoint commit: 5aab392c55c96f9bb26d9294f965f156a87ee81c Andrii Nakryiko (1): tools/libbpf: support bigger BTF data sizes src/btf.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -- 2.17.1
This is a mirror of bpf-next linux tree (https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next) bpf-next/tools/lib/bpf directory plus its supporting header files. The following files will by sync'ed with bpf-next repo: src/ <-> bpf-next/tools/lib/bpf/ include/uapi/linux/bpf_common.h <-> bpf-next/tools/include/uapi/linux/bpf_common.h include/uapi/linux/bpf.h <-> bpf-next/tools/include/uapi/linux/bpf.h include/uapi/linux/btf.h <-> bpf-next/tools/include/uapi/linux/btf.h include/uapi/linux/if_link.h <-> bpf-next/tools/include/uapi/linux/if_link.h include/uapi/linux/netlink.h <-> bpf-next/tools/include/uapi/linux/netlink.h include/tools/libc_compat.h <-> bpf-next/tools/include/tools/libc_compat.h Other header files at this repo (include/linux/*.h) are reduced versions of their counterpart files at bpf-next/tools/include/linux/*.h to make compilation successful. Build ===== To build static library libbpf.a: cd src make To build both static libbpf.a and shared libbpf.so libraries in directory build/ and install them together with libbpf headers in a staging directory root/: cd src mkdir build root BUILD_SHARED=y OBJDIR=build DESTDIR=root make install
Description
Languages
C
98.3%
Shell
1.4%
Makefile
0.3%