не удаётся скомпилировать bpf программу

вот код.

#include <linux/bpf.h>

#define SEC(NAME) __attribute__((section(NAME), used))

SEC("tracepoint/syscalls/sys_enter_execve")
int bpf_prog(void *ctx) {
        char msg[] = "Hello, BPF World!";
        bpf_trace_printk(msg, sizeof(msg));
        return 0;
}

char _license[] SEC("license") = "GPL";

вот makefile

C=/usr/include/x86_64-linux-gnu
S=/usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux
M=/usr/src/linux-hwe-5.8-headers-5.8.0-48/include/
MO=/usr/src/linux-hwe-5.8-headers-5.8.0-48/usr/include/
all:
        clang -O2 -target bpf -c bpf.c -I${S} -I${C} -I${M} -I${MO} -o bpf.o

вот ошибка

clang -O2 -target bpf -c bpf.c -I/usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux -I/usr/include/x86_64-linux-gnu -I/usr/src/linux-hwe-5.8-headers-5.8.0-48/include/ -I/usr/src/linux-hwe-5.8-headers-5.8.0-48/usr/include/ -o bpf.o
In file included from bpf.c:1:
In file included from /usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux/bpf.h:9:
In file included from /usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux/workqueue.h:9:
In file included from /usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux/timer.h:5:
In file included from /usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux/list.h:9:
In file included from /usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux/kernel.h:8:
/usr/src/linux-hwe-5.8-headers-5.8.0-48/include/linux/linkage.h:8:10: fatal error: 'asm/linkage.h' file not found
#include <asm/linkage.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make: *** [makefile:6: all] Error 1

Ответы (0 шт):