| 1 | #include "common.h" |
| 2 | |
| 3 | char _license[] __section("license") = "GPL"; |
| 4 | |
| 5 | struct bpf_testmod_ops { |
| 6 | int (*test_1)(void); |
| 7 | void (*test_2)(int, int); |
| 8 | int data; |
| 9 | }; |
| 10 | |
| 11 | __section("struct_ops/test_1") int test_1(void) { |
| 12 | return 0; |
| 13 | } |
| 14 | |
| 15 | __section(".struct_ops.link") struct bpf_testmod_ops testmod_ops = { |
| 16 | .test_1 = (void *)test_1, |
| 17 | .data = 0xdeadbeef, |
| 18 | }; |