History log of /linux-master/scripts/objdiff
Revision Date Author Comments
# b0d6207b 28-May-2022 Masahiro Yamada <masahiroy@kernel.org>

kbuild: clean .tmp_* pattern by make clean

Change the "make clean" rule to remove all the .tmp_* files.

.tmp_objdiff is the only exception, which should be removed by
"make mrproper".

Rename the record directory of objdiff, .tmp_objdiff to .objdiff to
avoid the removal by "make clean".

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)


# 958349cc 28-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 199

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>


# 65ba6fa4 16-Feb-2017 Stephen Boyd <stephen.boyd@linaro.org>

scripts: objdiff: Ignore debug info when comparing

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>


# 7fa0e6db 08-Jun-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

scripts: objdiff: support directories for the augument of record command

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>


# 8ac28bee 08-Jun-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

scripts: objdiff: fix a comment

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>


# 8b5d0f20 08-Jun-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

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>


# 18165efa 08-Jun-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

scripts: objdiff: improve path flexibility for record command

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>


# 1ecc8e48 08-Jun-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

scripts: objdiff: remove unnecessary code

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>


# 5ab370e9 08-Jun-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

scripts: objdiff: direct error messages to stderr

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>


# fd6e1242 08-Jun-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

scripts: objdiff: get the path to .tmp_objdiff more simply

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>


# 79192ca8 07-Apr-2014 Jason Cooper <jason@lakedaemon.net>

scripts: objdiff: detect object code changes between two commits

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>