field_reloc.bpf.c 265 B

123456789
  1. #include "reloc.h"
  2. #include "struct_with_scalars.h"
  3. __noinline int field_global() {
  4. struct relocated_struct_with_scalars s = {1, 2, 3};
  5. return set_output(__builtin_preserve_access_index(s.b));
  6. }
  7. SEC("uprobe") int program(void *ctx) { return field_global(); }