Skip to content

Commit

Permalink
libbpf: implement BPF CO-RE offset relocation algorithm
Browse files Browse the repository at this point in the history
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 <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Andrii Nakryiko authored and Alexei Starovoitov committed Aug 7, 2019
1 parent 4cedc0d commit ddc7c30
Show file tree
Hide file tree
Showing 2 changed files with 864 additions and 18 deletions.
Loading

0 comments on commit ddc7c30

Please sign in to comment.