Install the latest released version of libbcc
(either using a package manager or by building from source).
github.com/iovisor/gobpf/elf
Building ELF Object Files
To build ELF object files for use with the elf package, you must use specific
sections (SEC("...")). The following are currently supported:
kprobe/...
cgroup/skb
cgroup/sock
maps/...
socket...
tracepoint...
uprobe/...
uretprobe/...
xdp/...
Map definitions must correspond to bpf_map_def from the elf package.
Otherwise, you will encounter an error like only one map with size 280 bytes allowed per section (check bpf_map_def).
请发表评论