2 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Copyright © 2015 IBM Corporation
7 # This script checks the relocations of a vmlinux for "suspicious"
10 # based on relocs_check.pl
11 # Copyright © 2009 IBM Corporation
14 echo "$0 [path to objdump] [path to nm] [path to vmlinux]" 1>&2
19 ${srctree}/scripts/relocs_check.sh "$@" |
20 # These relocations are okay
22 # R_PPC64_RELATIVE, R_PPC64_NONE
24 # R_PPC_RELATIVE, R_PPC_ADDR16_HI,
25 # R_PPC_ADDR16_HA,R_PPC_ADDR16_LO,
27 grep -F -w -v 'R_PPC64_RELATIVE
37 if [ -z "$bad_relocs" ]; then
41 num_bad=$(echo "$bad_relocs" | wc -l)
42 echo "WARNING: $num_bad bad relocations"