summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/d_path.c
diff options
context:
space:
mode:
authorAnton Protopopov <a.s.protopopov@gmail.com>2025-11-05 09:04:08 +0000
committerAlexei Starovoitov <ast@kernel.org>2025-11-05 17:53:23 -0800
commitdd3fd3c965595a3ae8f4d70df6c42931b2fdfd24 (patch)
treecef12658c2706131973437bb2d9b2cd889fa25d0 /tools/testing/selftests/bpf/prog_tests/d_path.c
parentbc414d35831bffae725b249c8650669ed100e5f7 (diff)
libbpf: support llvm-generated indirect jumps
For v4 instruction set LLVM is allowed to generate indirect jumps for switch statements and for 'goto *rX' assembly. Every such a jump will be accompanied by necessary metadata, e.g. (`llvm-objdump -Sr ...`): 0: r2 = 0x0 ll 0000000000000030: R_BPF_64_64 BPF.JT.0.0 Here BPF.JT.1.0 is a symbol residing in the .jumptables section: Symbol table: 4: 0000000000000000 240 OBJECT GLOBAL DEFAULT 4 BPF.JT.0.0 The -bpf-min-jump-table-entries llvm option may be used to control the minimal size of a switch which will be converted to an indirect jumps. Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20251105090410.1250500-11-a.s.protopopov@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/d_path.c')
0 files changed, 0 insertions, 0 deletions