Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: Support llvm-objcopy for vmlinux BTF
Commit da5fb18 ("bpf: Support pre-2.25-binutils objcopy for vmlinux BTF") switched from --dump-section to --only-section/--change-section-address for BTF export assuming those ("legacy") options should cover all objcopy versions. Turns out llvm-objcopy doesn't implement --change-section-address [1], but it does support --dump-section. Let's partially roll back and try to use --dump-section first and fall back to --only-section/--change-section-address for the older binutils. 1. https://bugs.llvm.org/show_bug.cgi?id=45217 Fixes: df786c9 ("bpf: Force .BTF section start to zero when dumping from vmlinux") Tested-by: Nick Desaulniers <[email protected]> Reported-by: Nathan Chancellor <[email protected]> Link: ClangBuiltLinux#871 Signed-off-by: Stanislav Fomichev <[email protected]>
- Loading branch information