-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpftool: add support for split BTF to gen min_core_btf
Enables a user to generate minimized kernel module BTF. If an eBPF program probes a function within a kernel module or uses types that come from a kernel module, split BTF is required. The split module BTF contains only the BTF types that are unique to the module. It will reference the base/vmlinux BTF types and always starts its type IDs at X+1 where X is the largest type ID in the base BTF. Minimization allows a user to ship only the types necessary to do relocations for the program(s) in the provided eBPF object file(s). A minimized module BTF will still not contain vmlinux BTF types, so you should always minimize the vmlinux file first, and then minimize the kernel module file. Example: bpftool gen min_core_btf vmlinux.btf vm-min.btf prog.bpf.o bpftool -B vm-min.btf gen min_core_btf mod.btf mod-min.btf prog.bpf.o Signed-off-by: Bryce Kahle <bryce.kahle@datadoghq.com>
- Loading branch information
1 parent
b0e69ac
commit bdcd0a4
Showing
2 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters