History

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.

Masahiro Yamada committed 12 years ago

Commit 8b5d0f21 parent 18165ef1 file · +3 −2Browse files

Showing the changes to scripts/objdiff (1 of 1 file). Show all

Unified · Split

scripts/objdiff+3−2
@@ -65,13 +65,14 @@ dorecord() { · 64 unmodified lines
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