@@ -311,7 +311,7 @@ def process_stmt(
311311
312312
313313def process_func_body (
314- module , builder , func_node , func , ret_type , map_sym_tab , structs_sym_tab
314+ module , builder , func_node , func , ret_type , map_sym_tab , structs_sym_tab , vmlinux_assignments_symtab
315315):
316316 """Process the body of a bpf function"""
317317 # TODO: A lot. We just have print -> bpf_trace_printk for now
@@ -350,7 +350,7 @@ def process_func_body(
350350 builder .ret (ir .Constant (ir .IntType (64 ), 0 ))
351351
352352
353- def process_bpf_chunk (func_node , module , return_type , map_sym_tab , structs_sym_tab ):
353+ def process_bpf_chunk (func_node , module , return_type , map_sym_tab , structs_sym_tab , vmlinux_assignments_symtab ):
354354 """Process a single BPF chunk (function) and emit corresponding LLVM IR."""
355355
356356 func_name = func_node .name
@@ -384,7 +384,7 @@ def process_bpf_chunk(func_node, module, return_type, map_sym_tab, structs_sym_t
384384 builder = ir .IRBuilder (block )
385385
386386 process_func_body (
387- module , builder , func_node , func , ret_type , map_sym_tab , structs_sym_tab
387+ module , builder , func_node , func , ret_type , map_sym_tab , structs_sym_tab , vmlinux_assignments_symtab
388388 )
389389 return func
390390
@@ -394,7 +394,7 @@ def process_bpf_chunk(func_node, module, return_type, map_sym_tab, structs_sym_t
394394# ============================================================================
395395
396396
397- def func_proc (tree , module , chunks , map_sym_tab , structs_sym_tab ):
397+ def func_proc (tree , module , chunks , map_sym_tab , structs_sym_tab , vmlinux_assignments_symtab ):
398398 for func_node in chunks :
399399 if is_global_function (func_node ):
400400 continue
@@ -407,6 +407,7 @@ def func_proc(tree, module, chunks, map_sym_tab, structs_sym_tab):
407407 ctypes_to_ir (infer_return_type (func_node )),
408408 map_sym_tab ,
409409 structs_sym_tab ,
410+ vmlinux_assignments_symtab
410411 )
411412
412413
0 commit comments