xref: /linux/tools/testing/selftests/bpf/progs/test_btf_ext.c (revision e78f70bad29c5ae1e1076698b690b15794e9b81e)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2025 Meta Platforms Inc. */
3 
4 #include <linux/bpf.h>
5 #include <bpf/bpf_helpers.h>
6 #include "bpf_misc.h"
7 
8 char _license[] SEC("license") = "GPL";
9 
10 __noinline static void f0(void)
11 {
12 	__u64 a = 1;
13 
14 	__sink(a);
15 }
16 
17 SEC("xdp")
18 __u64 global_func(struct xdp_md *xdp)
19 {
20 	f0();
21 	return XDP_DROP;
22 }
23