Skip to content

Commit ddc7c30

Browse files
anakryikoAlexei Starovoitov
authored andcommitted
libbpf: implement BPF CO-RE offset relocation algorithm
This patch implements the core logic for BPF CO-RE offsets relocations. Every instruction that needs to be relocated has corresponding bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying to match recorded "local" relocation spec against potentially many compatible "target" types, creating corresponding spec. Details of the algorithm are noted in corresponding comments in the code. Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 4cedc0d commit ddc7c30

File tree

2 files changed

+864
-18
lines changed

2 files changed

+864
-18
lines changed

0 commit comments

Comments
 (0)