libbpf: move exception callbacks assignment logic into relocation step
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 4 Jan 2024 01:38:43 +0000 (17:38 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 4 Jan 2024 05:22:49 +0000 (21:22 -0800)
commitfb03be7c4a27c25696287df4ee06c5aafa31267c
tree11cfbb2f44610b9064a7ae73502d571642bbf3b9
parentdac645b950ea4fc0896fe46a645365cb8d9ab92b
libbpf: move exception callbacks assignment logic into relocation step

Move the logic of finding and assigning exception callback indices from
BTF sanitization step to program relocations step, which seems more
logical and will unblock moving BTF loading to after relocation step.

Exception callbacks discovery and assignment has no dependency on BTF
being loaded into the kernel, it only uses BTF information. It does need
to happen before subprogram relocations happen, though. Which is why the
split.

No functional changes.

Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240104013847.3875810-6-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c