summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-11-27 19:14:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-17 21:48:41 +0300
commitc8b4a8e3b6fc23cc39bba94c4f7a535208e07ef5 (patch)
treeef2aed25519746fb7072132fa2ee455acaa454f6 /tools
parent6d7c51075ffeb506df6f7a256a3a5f7a2290538a (diff)
downloadlinux-c8b4a8e3b6fc23cc39bba94c4f7a535208e07ef5.tar.xz
bpf: Support pre-2.25-binutils objcopy for vmlinux BTF
commit da5fb18225b49b97bb37c51bcbbb2990a507c364 upstream. If vmlinux BTF generation fails, but CONFIG_DEBUG_INFO_BTF is set, .BTF section of vmlinux is empty and kernel will prohibit BPF loading and return "in-kernel BTF is malformed". --dump-section argument to binutils' objcopy was added in version 2.25. When using pre-2.25 binutils, BTF generation silently fails. Convert to --only-section which is present on pre-2.25 binutils. Documentation/process/changes.rst states that binutils 2.21+ is supported, not sure those standards apply to BPF subsystem. v2: * exit and print an error if gen_btf fails (John Fastabend) v3: * resend with Andrii's Acked-by/Tested-by tags Fixes: 341dfcf8d78ea ("btf: expose BTF info through sysfs") Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Andrii Nakryiko <andriin@fb.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Cc: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20191127161410.57327-1-sdf@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions