1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
5 #include <bpf/bpf_helpers.h>
7 /* 4-byte aligned .data */
8 static volatile int static_var1 = 5;
9 static volatile int static_var2 = 6;
11 /* 8-byte aligned .rodata */
12 const volatile long rovar2;
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 handler2(const void *ctx)
24 var2 = subprog(rovar2) + static_var1 + static_var2;
29 /* different name and/or type of the variable doesn't matter */
30 char _license[] SEC("license") = "GPL";
31 int _version SEC("version") = 1;