diff options
author | Julien Thierry <jthierry@redhat.com> | 2020-09-04 17:30:19 +0200 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-09-10 17:43:13 +0200 |
commit | 3890b8d92710af75baedf291832cf40193b33454 (patch) | |
tree | cad1f36884fa27eced4354bf4a45870c6b926e9d | |
parent | objtool: Define 'struct orc_entry' only when needed (diff) | |
download | linux-3890b8d92710af75baedf291832cf40193b33454.tar.xz linux-3890b8d92710af75baedf291832cf40193b33454.zip |
objtool: Group headers to check in a single list
In order to support multiple architectures and potentially different
sets of headers to compare against their kernel equivalent, it is
simpler to have all headers to check in a single list.
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
-rwxr-xr-x | tools/objtool/sync-check.sh | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/tools/objtool/sync-check.sh b/tools/objtool/sync-check.sh index aa099b21dffa..b5f526638f0a 100755 --- a/tools/objtool/sync-check.sh +++ b/tools/objtool/sync-check.sh @@ -1,14 +1,18 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 -FILES=' +FILES=" arch/x86/include/asm/inat_types.h arch/x86/include/asm/orc_types.h arch/x86/include/asm/emulate_prefix.h arch/x86/lib/x86-opcode-map.txt arch/x86/tools/gen-insn-attr-x86.awk include/linux/static_call_types.h -' +arch/x86/include/asm/inat.h -I '^#include [\"<]\(asm/\)*inat_types.h[\">]' +arch/x86/include/asm/insn.h -I '^#include [\"<]\(asm/\)*inat.h[\">]' +arch/x86/lib/inat.c -I '^#include [\"<]\(../include/\)*asm/insn.h[\">]' +arch/x86/lib/insn.c -I '^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]' -I '^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]' +" check_2 () { file1=$1 @@ -41,11 +45,12 @@ fi cd ../.. -for i in $FILES; do - check $i -done +while read -r file_entry; do + if [ -z "$file_entry" ]; then + continue + fi -check arch/x86/include/asm/inat.h '-I "^#include [\"<]\(asm/\)*inat_types.h[\">]"' -check arch/x86/include/asm/insn.h '-I "^#include [\"<]\(asm/\)*inat.h[\">]"' -check arch/x86/lib/inat.c '-I "^#include [\"<]\(../include/\)*asm/insn.h[\">]"' -check arch/x86/lib/insn.c '-I "^#include [\"<]\(../include/\)*asm/in\(at\|sn\).h[\">]" -I "^#include [\"<]\(../include/\)*asm/emulate_prefix.h[\">]"' + check $file_entry +done <<EOF +$FILES +EOF |