]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object
authorJiri Olsa <jolsa@kernel.org>
Sat, 11 Jul 2020 21:53:21 +0000 (23:53 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 13 Jul 2020 17:42:02 +0000 (10:42 -0700)
commit8b83ae4301178c4de5643525f1f66d9af62433ad
treee18521a9caf782322baba389d26d67617043d41f
parent365022c98e527cae1068e956530d0109fa34e76b
bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object

The resolve_btfids tool scans elf object for .BTF_ids section
and resolves its symbols with BTF ID values.

It will be used to during linking time to resolve arrays of BTF
ID values used in verifier, so these IDs do not need to be
resolved in runtime.

The expected layout of .BTF_ids section is described in main.c
header. Related kernel changes are coming in following changes.

Build issue reported by 0-DAY CI Kernel Test Service.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200711215329.41165-2-jolsa@kernel.org
tools/bpf/resolve_btfids/Build [new file with mode: 0644]
tools/bpf/resolve_btfids/Makefile [new file with mode: 0644]
tools/bpf/resolve_btfids/main.c [new file with mode: 0644]