1 // SPDX-License-Identifier: GPL-2.0
4 #include <bpf/bpf_helpers.h>
5 #include <bpf/bpf_tracing.h>
7 char _license[] SEC("license") = "GPL";
11 SEC("struct_ops/test_1")
18 SEC("struct_ops/test_1")
24 struct bpf_testmod_ops___v1 {
28 struct bpf_testmod_ops___v2 {
30 int (*does_not_exist)(void);
33 SEC(".struct_ops.link")
34 struct bpf_testmod_ops___v1 testmod_1 = {
35 .test_1 = (void *)test_1
38 SEC(".struct_ops.link")
39 struct bpf_testmod_ops___v2 testmod_2 = {
40 .test_1 = (void *)test_1,
41 .does_not_exist = (void *)test_2
45 struct bpf_testmod_ops___v1 optional_map = {
46 .test_1 = (void *)test_1,
49 SEC("?.struct_ops.link")
50 struct bpf_testmod_ops___v1 optional_map2 = {
51 .test_1 = (void *)test_1,