diff options
author | Tao Chen <chentao.kernel@linux.alibaba.com> | 2022-09-13 00:43:00 +0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-09-21 17:26:16 -0700 |
commit | 01f2e36c959c813a532ae836db49b2ac9de46de4 (patch) | |
tree | ebfe4a27368556686e6aebb55f3b0e3de9217274 /kernel/bpf | |
parent | 272d1f4cfa3c75d4828b62ef33ccb207da3b7350 (diff) |
libbpf: Support raw BTF placed in the default search path
Currently, the default vmlinux files at '/boot/vmlinux-*',
'/lib/modules/*/vmlinux-*' etc. are parsed with 'btf__parse_elf()' to
extract BTF. It is possible that these files are actually raw BTF files
similar to /sys/kernel/btf/vmlinux. So parse these files with
'btf__parse' which tries both raw format and ELF format.
This might be useful in some scenarios where users put their custom BTF
into known locations and don't want to specify btf_custom_path option.
Signed-off-by: Tao Chen <chentao.kernel@linux.alibaba.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/3f59fb5a345d2e4f10e16fe9e35fbc4c03ecaa3e.1662999860.git.chentao.kernel@linux.alibaba.com
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions