I'm trying to run this program, which is compiled with clang:
#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!\n";
bpf_trace_printk(msg, sizeof(msg));
return 0;
}
char _license[] SEC("license") = "GFPL";
On version = "2.3.0" it seems to work, but tracepoints_mut() is not present and I think I need that to make the program do something. Loader::load() returns an Ok.
On master it complains about this: ParseError(Reloc).
I'm new to this so any advice is welcomed. Perhaps I should not load programs compiled from c with clang with this library.
I'm trying to run this program, which is compiled with clang:
On
version = "2.3.0"it seems to work, buttracepoints_mut()is not present and I think I need that to make the program do something. Loader::load() returns an Ok.On
masterit complains about this:ParseError(Reloc).I'm new to this so any advice is welcomed. Perhaps I should not load programs compiled from c with clang with this library.