[PATCH 5/7] scripts: objdiff: change the extension of disassembly from .o to .dis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Prior to this commit, the command "scripts/objdiff record path/to/*.o"
disassembles 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 "make clean" removes all the *.o files.
Disassembled code should be dumped into *.dis instead of *.o file.

Signed-off-by: Masahiro Yamada <yamada.m@xxxxxxxxxxxxxxxx>
Cc: Jason Cooper <jason@xxxxxxxxxxxxxx>
---
 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
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux