summaryrefslogtreecommitdiff
path: root/scripts/objdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 199Thomas Gleixner1-1/+1
Based on 1 normalized pattern(s): licensed under the terms of the gnu gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 1 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.911569875@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-11scripts: objdiff: Ignore debug info when comparingStephen Boyd1-1/+4
If the kernel is configured to be built with debug symbols, or has bug tables, comparing files may not work if line numbers change. This makes comparing object files with these options harder to do. Let's strip out the debug info and drop the __bug_table here so that we don't see false positives. There may be other things to drop later, and it may be architecture specific, but this works for me with my ARM64 build. Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Reviewed-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2014-06-10scripts: objdiff: support directories for the augument of record commandMasahiro Yamada1-11/+22
For example, $ scripts/objdiff record init drivers/usb disassembles all the objects under init and drivers/usb directories. This feature would be useful when we change various files under the specific directory. 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>
2014-06-10scripts: objdiff: fix a commentMasahiro Yamada1-1/+1
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>
2014-06-10scripts: objdiff: change the extension of disassembly from .o to .disMasahiro Yamada1-2/+3
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>
2014-06-10scripts: objdiff: improve path flexibility for record commandMasahiro Yamada1-6/+16
Prior to this commit, scripts/objdiff expected to be run at the top directory and only the relative path of objects. This commit provides more flexibility in terms of object path: [1] scripts/objdiff can be run in any directory For example, $ scripts/objdiff record init/main.o and $ cd init; ../scripts/objdiff record main.o produce the same result. [2] Support absolute path for objects $ scripts/objdiff record /home/foo/bar/linux/init/main.o work as well. 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>
2014-06-10scripts: objdiff: remove unnecessary codeMasahiro Yamada1-2/+0
The directories for objdump is created by the code a few lines below: [ ! -d "$OBJDIFFD/$dn" ] && mkdir -p "$OBJDIFFD/$dn" 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>
2014-06-10scripts: objdiff: direct error messages to stderrMasahiro Yamada1-9/+9
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>
2014-06-10scripts: objdiff: get the path to .tmp_objdiff more simplyMasahiro Yamada1-7/+5
This commit is a minor refactoring. Temporary files for objdiff are stored in .tmp_objdiff directory which is located at the top directory. To get the path to this directory, SRCTREE=`git rev-parse --show-toplevel` TMPD=$SRCTREE/.tmp_objdiff seems easier to understand than GIT_DIR=`git rev-parse --git-dir` TMPD=${GIT_DIR%git}tmp_objdiff Besides, it is not always necessary to create .tmp_objdiff dicrectory. It should be created only for "record" command. 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>
2014-04-08scripts: objdiff: detect object code changes between two commitsJason Cooper1-0/+141
objdiff is useful when doing large code cleanups. For example, when removing checkpatch warnings and errors from new drivers in the staging tree. objdiff can be used in conjunction with a git rebase to confirm that each commit made no changes to the resulting object code. It has the same return values as diff(1). This was written specifically to support adding the skein and threefish cryto drivers to the staging tree. I needed a programmatic way to confirm that commits changing >90% of the lines didn't inadvertently change the code. Temporary files (objdump output) are stored in /path/to/linux/.tmp_objdiff 'make mrproper' will remove this directory. Signed-off-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>