aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-06-08 22:16:38 -0400
committerMichal Marek <mmarek@suse.cz>2014-06-10 08:59:33 -0400
commit8b5d0f20d64f00ffd5685879f8eb3659379f5aaa (patch)
treef1e3418163d8d1643e9714a8badebb01661231ad /scripts
parent18165efa8203a34d82f60a1831ea290e7304c654 (diff)
scripts: objdiff: change the extension of disassembly from .o to .dis
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 <yamada.m@jp.panasonic.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/objdiff5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/objdiff b/scripts/objdiff
index 499eb4bc1e8d..c997e44e4b54 100755
--- a/scripts/objdiff
+++ b/scripts/objdiff
@@ -65,13 +65,14 @@ dorecord() {
65 65
66 for f in $FILES; do 66 for f in $FILES; do
67 dir=$(get_output_dir $f) 67 dir=$(get_output_dir $f)
68 bn="${f##*/}" 68 base=${f##*/}
69 dis=$dir/${base%.o}.dis
69 70
70 [ ! -d "$dir" ] && mkdir -p $dir 71 [ ! -d "$dir" ] && mkdir -p $dir
71 72
72 # remove addresses for a more clear diff 73 # remove addresses for a more clear diff
73 # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and 74 # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and
74 $OBJDUMP -D $f | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dir/$bn 75 $OBJDUMP -D $f | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dis
75 done 76 done
76} 77}
77 78