mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
support referencing other variables inside binops
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
BPF_CLANG := clang
|
||||
CFLAGS := -O2 -emit-llvm -target bpf -c
|
||||
CFLAGS := -O0 -emit-llvm -target bpf -c
|
||||
|
||||
SRC := $(wildcard *.bpf.c)
|
||||
LL := $(SRC:.bpf.c=.bpf.ll)
|
||||
|
||||
@ -13,6 +13,9 @@ struct {
|
||||
SEC("tracepoint/syscalls/sys_enter_execve")
|
||||
int hello(struct pt_regs *ctx) {
|
||||
bpf_printk("Hello, World!\n");
|
||||
u64 b;
|
||||
u64 a = 3 * b;
|
||||
bpf_printk("%d", a);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user