Issue eBPF kernel programs with ldc?
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Sun Jan 5 14:27:57 UTC 2025
On 06/01/2025 3:17 AM, data pulverizer wrote:
> long bpf_trace_printk(const(char)* fmt, uint fmt_size, ...);
> libbpf: failed to find BTF for extern 'bpf_trace_printk': -2
Compare your D definition against:
```c
static long (* const bpf_trace_printk)(const char *fmt, __u32 fmt_size,
...) = (void *) 6;
```
https://github.com/libbpf/libbpf/blob/c5f22aca0f3aa855daa159b2777472b35e721804/src/bpf_helper_defs.h#L185
The reason it cannot find it, is because its looking for a function,
when it is a global variable.
More information about the Digitalmars-d-learn
mailing list