Skip to content

Commit 1004742

Browse files
anakryikoAlexei Starovoitov
authored andcommitted
libbpf: move BTF loading step after relocation step
With all the preparations in previous patches done we are ready to postpone BTF loading and sanitization step until after all the relocations are performed. Acked-by: Jiri Olsa <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent fb03be7 commit 1004742

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lib/bpf/libbpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8104,10 +8104,10 @@ static int bpf_object_load(struct bpf_object *obj, int extra_log_level, const ch
81048104
err = bpf_object__probe_loading(obj);
81058105
err = err ? : bpf_object__load_vmlinux_btf(obj, false);
81068106
err = err ? : bpf_object__resolve_externs(obj, obj->kconfig);
8107-
err = err ? : bpf_object__sanitize_and_load_btf(obj);
81088107
err = err ? : bpf_object__sanitize_maps(obj);
81098108
err = err ? : bpf_object__init_kern_struct_ops_maps(obj);
81108109
err = err ? : bpf_object__relocate(obj, obj->btf_custom_path ? : target_btf_path);
8110+
err = err ? : bpf_object__sanitize_and_load_btf(obj);
81118111
err = err ? : bpf_object__create_maps(obj);
81128112
err = err ? : bpf_object__load_progs(obj, extra_log_level);
81138113
err = err ? : bpf_object_init_prog_arrays(obj);

0 commit comments

Comments
 (0)