Closed smagnani96 closed 2 weeks ago
-- 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
ebpf.Variable
bpf2go
cc @ti-mo PTAL
This was merged in https://github.com/cilium/ebpf/pull/1572. bpf2go work continuing in https://github.com/cilium/ebpf/pull/1543.
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
: #1543 (rebased on https://github.com/ti-mo/ebpf/tree/tb/ebpf-variables plus some required hack)