Skip to content

Commit 8b5d0f2

Browse files
masahir0ymichal42
authored andcommitted
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>
1 parent 18165ef commit 8b5d0f2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/objdiff

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ dorecord() {
6565

6666
for f in $FILES; do
6767
dir=$(get_output_dir $f)
68-
bn="${f##*/}"
68+
base=${f##*/}
69+
dis=$dir/${base%.o}.dis
6970

7071
[ ! -d "$dir" ] && mkdir -p $dir
7172

7273
# remove addresses for a more clear diff
7374
# 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
7576
done
7677
}
7778

0 commit comments

Comments
 (0)