Files
cgproxy/execsnoop-libbpf/readme.md
2022-12-30 15:25:45 +08:00

19 lines
309 B
Markdown

generate `vmlinux.h`
```shell
bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
```
compiled into BPF ELF file
```shell
clang -O2 -g -target bpf -c execsnoop.bpf.c -o execsnoop.bpf.o
```
generate BPF skeleton .skel.h
```shell
bpftool gen skeleton execsnoop.bpf.o > execsnoop.skel.h
```