1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
5 #include <bpf/bpf_helpers.h>
7 /* 8-byte aligned .data */
8 static volatile long static_var1 = 2;
9 static volatile int static_var2 = 3;
11 /* 4-byte aligned .rodata */
12 const volatile int rovar1;
14 /* same "subprog" name in both files */
15 static __noinline int subprog(int x)
17 /* but different formula */
21 SEC("raw_tp/sys_enter")
22 int handler1(const void *ctx)
24 var1 = subprog(rovar1) + static_var1 + static_var2;
29 char LICENSE[] SEC("license") = "GPL";
30 int VERSION SEC("version") = 1;