Since we can attach ebpf program to any specific address in python using uprobe using the following function
b.attach_uprobe(name="/usr/bin/bash", addr=event_addr , fn_name="func_name")
But in c apart from specifying the address in .c file using libbpf-tools we also have to specify symbol in section inside .bpf.c file for uprobe function.So how can we achieve similar functionality in pure c code as well?
Since we can attach ebpf program to any specific address in python using uprobe using the following function
b.attach_uprobe(name="/usr/bin/bash", addr=event_addr , fn_name="func_name")
But in c apart from specifying the address in .c file using libbpf-tools we also have to specify symbol in section inside .bpf.c file for uprobe function.So how can we achieve similar functionality in pure c code as well?