Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

ParseError(Reloc) on master #353

Open
JosuGZ opened this issue Dec 8, 2022 · 0 comments
Open

ParseError(Reloc) on master #353

JosuGZ opened this issue Dec 8, 2022 · 0 comments

Comments

@JosuGZ
Copy link

JosuGZ commented Dec 8, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant