]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Record extern sym relocation first
authorMartin KaFai Lau <kafai@fb.com>
Thu, 25 Mar 2021 01:52:27 +0000 (18:52 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 27 Mar 2021 03:41:51 +0000 (20:41 -0700)
commit94984bc70687c8fdf71321285da544241b07cefc
treecce5b4309f5669bf16a6cf4be613d44a535ab615
parente88ee16c463f4bc80dd6a33572e4e68a607c61ff
libbpf: Record extern sym relocation first

This patch records the extern sym relocs first before recording
subprog relocs.  The later patch will have relocs for extern
kernel function call which is also using BPF_JMP | BPF_CALL.
It will be easier to handle the extern symbols first in
the later patch.

is_call_insn() helper is added.  The existing is_ldimm64() helper
is renamed to is_ldimm64_insn() for consistency.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210325015227.1548623-1-kafai@fb.com
tools/lib/bpf/libbpf.c