diff options
author | Roman Gushchin <guro@fb.com> | 2017-12-27 20:16:29 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-30 01:07:36 +0100 |
commit | fb982666e380c1632a74495b68b3c33a66e76430 (patch) | |
tree | 33a026c7772aa6845d6f992bd5a0a99b7fc842c6 /tools/bpf/bpf_jit_disasm.c | |
parent | tools/bpftool: use version from the kernel source tree (diff) | |
download | linux-fb982666e380c1632a74495b68b3c33a66e76430.tar.xz linux-fb982666e380c1632a74495b68b3c33a66e76430.zip |
tools/bpftool: fix bpftool build with bintutils >= 2.9
Bpftool build is broken with binutils version 2.29 and later.
The cause is commit 003ca0fd2286 ("Refactor disassembler selection")
in the binutils repo, which changed the disassembler() function
signature.
Fix this by adding a new "feature" to the tools/build/features
infrastructure and make it responsible for decision which
disassembler() function signature to use.
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpf_jit_disasm.c')
-rw-r--r-- | tools/bpf/bpf_jit_disasm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/bpf/bpf_jit_disasm.c b/tools/bpf/bpf_jit_disasm.c index 75bf526a0168..30044bc4f389 100644 --- a/tools/bpf/bpf_jit_disasm.c +++ b/tools/bpf/bpf_jit_disasm.c @@ -72,7 +72,14 @@ static void get_asm_insns(uint8_t *image, size_t len, int opcodes) disassemble_init_for_target(&info); +#ifdef DISASM_FOUR_ARGS_SIGNATURE + disassemble = disassembler(info.arch, + bfd_big_endian(bfdf), + info.mach, + bfdf); +#else disassemble = disassembler(bfdf); +#endif assert(disassemble); do { |