Skip to content

Commit

Permalink
scripts: objdiff: change the extension of disassembly from .o to .dis
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
masahir0y authored and michal42 committed Jun 10, 2014
1 parent 18165ef commit 8b5d0f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/objdiff
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 8b5d0f2

Please sign in to comment.