Skip to content

BTF: the kernel describes itself

Step 3 of 8Concept
PATH
/sys/kernel/btf
SIZE
~4–6 MB
DWARF
deduplicated
REQUIREMENT
Linux 5.5+
  • compile / emit relocs
  • BTF offset patch
  • load verified ELF
BTF, CO-RE & Toolchains, step 3 of 8

BTF (BPF Type Format) embeds a deduplicated, compact type graph of every kernel struct, enum, and function directly inside the running kernel at /sys/kernel/btf/vmlinux.

Instead of installing 100 MB of kernel headers, a developer generates one single vmlinux.h file at build time and lets the target kernel report its exact layout at load time.

Type to search…

↑↓ navigate↵ selectEsc close