From patchwork Mon Jun 9 02:16:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 4317451 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1C1859F4BD for ; Mon, 9 Jun 2014 02:17:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EF392018A for ; Mon, 9 Jun 2014 02:17:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 617DC20173 for ; Mon, 9 Jun 2014 02:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932102AbaFICRw (ORCPT ); Sun, 8 Jun 2014 22:17:52 -0400 Received: from smtp.mei.co.jp ([133.183.100.20]:53334 "EHLO smtp.mei.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754271AbaFICRw (ORCPT ); Sun, 8 Jun 2014 22:17:52 -0400 Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile14) with ESMTP id s592HnYN013990; Mon, 9 Jun 2014 11:17:49 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili17) with ESMTP id s592Hn332666; Mon, 9 Jun 2014 11:17:49 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi15) id s592HnWS023621; Mon, 9 Jun 2014 11:17:49 +0900 Received: from poodle by lomi15.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s592Hn2K023557; Mon, 9 Jun 2014 11:17:49 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 27E742740043; Mon, 9 Jun 2014 11:17:49 +0900 (JST) From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Jason Cooper , Masahiro Yamada Subject: [PATCH v2 5/7] scripts: objdiff: change the extension of disassembly from .o to .dis Date: Mon, 9 Jun 2014 11:16:38 +0900 Message-Id: <1402280200-21834-6-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1402280200-21834-1-git-send-email-yamada.m@jp.panasonic.com> References: <1402280200-21834-1-git-send-email-yamada.m@jp.panasonic.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Prior to this commit, the command "scripts/objdiff record path/to/*.o" disassembled the given object into ".tmp_objdiff/path/to/*.o" file. The problem here is that recorded disassemblies are lost if we run "make clean" because it removes all the *.o files. Disassembled code should be dumped into *.dis instead of *.o files. Signed-off-by: Masahiro Yamada Cc: Jason Cooper Acked-by: Jason Cooper --- Changes in v2: None scripts/objdiff | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/objdiff b/scripts/objdiff index 499eb4b..c997e44 100755 --- a/scripts/objdiff +++ b/scripts/objdiff @@ -65,13 +65,14 @@ dorecord() { for f in $FILES; do dir=$(get_output_dir $f) - bn="${f##*/}" + base=${f##*/} + dis=$dir/${base%.o}.dis [ ! -d "$dir" ] && mkdir -p $dir # remove addresses for a more clear diff # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and - $OBJDUMP -D $f | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dir/$bn + $OBJDUMP -D $f | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dis done }