[PATCH] D53261: [BPF] Add BTF generation for BPF target
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 18 14:13:26 PDT 2018
yonghong-song added a comment.
I just added some more commit messages to make it clear. The below is
what happens when "-target bpf -g" is specified:
. both dwarf and BTF sections will be generated.
. We still need dwarf for llvm-objdump or any other
user space tools which inspect dwarf, which may
help debug/inspect the BPF byte codes.
. BTF sections are consumed by kernel BTF loader
and kernel itself.
. When the BPF object files are ready to deploy to
different machines for kernel loading/execution,
all dwarf sections can be stripped as they will
not be used any more.
I briefly looked at the parsing directly from IR
to BTF. The CodeView provides a good example
and it is certainly possible. But since we need
to generate dwarf anyway, dwarf2BTF seems
more compelling?
Repository:
rL LLVM
https://reviews.llvm.org/D53261
More information about the llvm-commits
mailing list