Relative Content

Tag Archive for ebpfbpf

libbpf: failed to find BTF for extern ‘syscall’

#include <linux/bpf.h> #include <bpf/bpf_helpers.h> #include <stdint.h> #include <stdio.h> #include <unistd.h> #include <sys/syscall.h> static inline int sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr, unsigned int size) { return syscall(__NR_bpf, cmd, attr, size); } int bpf_create_map(enum bpf_map_type map_type, unsigned int key_size, unsigned int value_size, unsigned int max_entries) { union bpf_attr attr = { .map_type = map_type, .key_size = […]