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

ParseError(Reloc) on master #353

@JosuGZ

Description

@JosuGZ

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions