tools/resolve_btfids: Fix build error with older host toolchains
stable inclusion from stable-5.10.24 commit 8493877b58b6f35d643da307ee1ae920b3ddd1d8 bugzilla: 51348 -------------------------------- commit 41462c6e upstream. Older libelf.h and glibc elf.h might not yet define the ELF compression types. Checking and defining SHF_COMPRESSED fix the build error when compiling with older toolchains. Also, the tool resolve_btfids is compiled with host toolchain. The host toolchain is more likely to be older than the cross compile toolchain. Fixes: 51f6463a ("tools/resolve_btfids: Fix sections with wrong alignment") Signed-off-by: NKun-Chuan Hsieh <jetswayss@gmail.com> Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net> Acked-by: NJiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/bpf/20210224052752.5284-1-jetswayss@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: N Weilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录