Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754633AbdDMREU (ORCPT ); Thu, 13 Apr 2017 13:04:20 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:33616 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754314AbdDMRER (ORCPT ); Thu, 13 Apr 2017 13:04:17 -0400 Date: Thu, 13 Apr 2017 13:04:15 -0400 (EDT) Message-Id: <20170413.130415.1776516439699504044.davem@davemloft.net> To: david.daney@cavium.com Cc: ast@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools: bpf_jit_disasm: Add option to dump JIT image to a file. From: David Miller In-Reply-To: <20170411213052.7337-1-david.daney@cavium.com> References: <20170411213052.7337-1-david.daney@cavium.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 13 Apr 2017 09:22:56 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 663 Lines: 18 From: David Daney Date: Tue, 11 Apr 2017 14:30:52 -0700 > When debugging the JIT on an embedded platform or cross build > environment, libbfd may not be available, making it impossible to run > bpf_jit_disasm natively. > > Add an option to emit a binary image of the JIT code to a file. This > file can then be disassembled off line. Typical usage in this case > might be (pasting mips64 dmesg output to cat command): > > $ cat > jit.raw > $ bpf_jit_disasm -f jit.raw -O jit.bin > $ mips64-linux-gnu-objdump -D -b binary -m mips:isa64r2 -EB jit.bin > > Signed-off-by: David Daney Applied, thanks.