xref: /openbmc/linux/tools/objtool/sync-check.sh (revision 6d99a79c)
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4FILES='
5arch/x86/lib/insn.c
6arch/x86/lib/inat.c
7arch/x86/lib/x86-opcode-map.txt
8arch/x86/tools/gen-insn-attr-x86.awk
9arch/x86/include/asm/insn.h
10arch/x86/include/asm/inat.h
11arch/x86/include/asm/inat_types.h
12arch/x86/include/asm/orc_types.h
13'
14
15check()
16{
17	local file=$1
18
19	diff $file ../../$file > /dev/null ||
20		echo "Warning: synced file at 'tools/objtool/$file' differs from latest kernel version at '$file'"
21}
22
23if [ ! -d ../../kernel ] || [ ! -d ../../tools ] || [ ! -d ../objtool ]; then
24	exit 0
25fi
26
27for i in $FILES; do
28  check $i
29done
30