You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document extern "C" for BPF programs and kfuncs #3
Without extern "C", C++ name mangling changes ELF symbol names: a program on_switch becomes _Z9on_switchPy and a kfunc bpf_task_acquire becomes _Z16bpf_task_acquireP11task_struct. libbpf then names the program after the mangled symbol and cannot resolve the kfunc in the kernel.
BPF programs, kfunc and ksym declarations must be declared extern "C":
Activity