btf: do not use CONFIG_OUTPUT_FORMAT
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 20 Aug 2019 11:29:39 +0000 (13:29 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Aug 2019 12:57:17 +0000 (14:57 +0200)
commitfdf37037664041cfdbcab6cf54ddb2c1c219034b
tree6ea045f56ddafe44f1fcc99572b75c7b1195e56e
parentbb4b5c08a8e0f854a313184498b22fa37dd087db
btf: do not use CONFIG_OUTPUT_FORMAT

Building s390 kernel with CONFIG_DEBUG_INFO_BTF fails, because
CONFIG_OUTPUT_FORMAT is not defined. As a matter of fact, this variable
appears to be x86-only, so other arches might be affected as well.

Fix by obtaining this value from objdump output, just like it's already
done for bin_arch. The exact objdump invocation is "inspired" by
arch/powerpc/boot/wrapper.

Also, use LANG=C for the existing bin_arch objdump invocation to avoid
potential build issues on systems with non-English locale.

Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
scripts/link-vmlinux.sh