mirror of
https://github.com/netdata/libbpf.git
synced 2026-11-06 01:40:15 +08:00
libbpf: add BPF_CALL_REL() macro implementation
Add BPF_CALL_REL() macro implementation into include/linux/filter.h header, which is now used by libbpf code for feature detection. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
1 parent
0f84f3bef6
commit
274d6037f8
1 file changed
+7
@@ -37,6 +37,13 @@
|
||||
.off = 0, \
|
||||
.imm = IMM })
|
||||
|
||||
#define BPF_CALL_REL(DST) \
|
||||
((struct bpf_insn) { \
|
||||
.dst_reg = 0, \
|
||||
.src_reg = BPF_PSEUDO_CALL, \
|
||||
.off = 0, \
|
||||
.imm = DST })
|
||||
|
||||
#define BPF_EXIT_INSN() \
|
||||
((struct bpf_insn) { \
|
||||
.code = BPF_JMP | BPF_EXIT, \
|
||||
|
||||
Reference in new issue
Block a user