diff options
author | Hengqi Chen <[email protected]> | 2023-09-29 15:59:54 +0000 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2023-09-29 14:32:20 -0700 |
commit | 2147c8d07e1abc8dfc3433ca18eed5295e230ede (patch) | |
tree | ae624ec94a2518190b7e8969c2ddfa9276fcb4dd /net/lapb/lapb_subr.c | |
parent | 9e09b75079e229b08f12a732712100fdb9af8cab (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 <[email protected]>
Signed-off-by: Hengqi Chen <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions