aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorHengqi Chen <hengqi.chen@gmail.com>2023-09-29 15:59:54 +0000
committerAndrii Nakryiko <andrii@kernel.org>2023-09-29 14:32:20 -0700
commit2147c8d07e1abc8dfc3433ca18eed5295e230ede (patch)
treeae624ec94a2518190b7e8969c2ddfa9276fcb4dd /lib/crypto/mpi/mpi-sub-ui.c
parent9e09b75079e229b08f12a732712100fdb9af8cab (diff)
libbpf: Allow Golang symbols in uprobe secdef
Golang symbols in ELF files are different from C/C++ which contains special characters like '*', '(' and ')'. With generics, things get more complicated, there are symbols like: github.com/cilium/ebpf/internal.(*Deque[go.shape.interface { Format(fmt.State, int32); TypeName() string;github.com/cilium/ebpf/btf.copy() github.com/cilium/ebpf/btf.Type}]).Grow Matching such symbols using `%m[^\n]` in sscanf, this excludes newline which typically does not appear in ELF symbols. This should work in most use-cases and also work for unicode letters in identifiers. If newline do show up in ELF symbols, users can still attach to such symbol by specifying bpf_uprobe_opts::func_name. A working example can be found at this repo ([0]). [0]: https://github.com/chenhengqi/libbpf-go-symbols Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20230929155954.92448-1-hengqi.chen@gmail.com
Diffstat (limited to 'lib/crypto/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions