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
ti-mo
changed the title
enhancement: API for interacting with static and global variables
New API in Collection{Spec} for modifying global BPF variables
Sep 5, 2024
Describe the bug
-- Newbie here, text to be adjusted --
Opening this issue to discuss a possible enhancement to the library regarding the interaction with static/global variables in an eBPF program. AFAIU, the current state of the library doesn't allow to interact with such data, since the map containing these varaibles (".rodata", ".data", ".bss") are not emitted (referring to https://github.com/cilium/ebpf/blob/main/cmd/bpf2go/main.go#L367 and https://github.com/cilium/ebpf/blob/main/cmd/bpf2go/gen/output.go#L108).
Useful pointers:
Ongoing effort:
Map.Memory
andebpf.Variable
support: https://github.com/ti-mo/ebpf/tree/tb/ebpf-variablesbpf2go
support forebpf.Variable
: bpf2go: type-safe ebpf.Variable wrappers #1543 (rebased on https://github.com/ti-mo/ebpf/tree/tb/ebpf-variables plus some required hack)The text was updated successfully, but these errors were encountered: