diff options
Diffstat (limited to 'arch/powerpc/tools/unrel_branch_check.sh')
-rwxr-xr-x | arch/powerpc/tools/unrel_branch_check.sh | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/tools/unrel_branch_check.sh b/arch/powerpc/tools/unrel_branch_check.sh index 70da90270c78..0369eb2e7e4b 100755 --- a/arch/powerpc/tools/unrel_branch_check.sh +++ b/arch/powerpc/tools/unrel_branch_check.sh @@ -5,18 +5,15 @@ # This script checks the unrelocated code of a vmlinux for "suspicious" # branches to relocated code (head_64.S code). -# Have Kbuild supply the path to objdump so we handle cross compilation. +# Have Kbuild supply the path to objdump and nm so we handle cross compilation. objdump="$1" -vmlinux="$2" +nm="$2" +vmlinux="$3" -#__end_interrupts should be located within the first 64K kstart=0xc000000000000000 -printf -v kend '0x%x' $(( kstart + 0x10000 )) -end_intr=0x$( -$objdump -R -d --start-address="$kstart" --stop-address="$kend" "$vmlinux" 2>/dev/null | -awk '$2 == "<__end_interrupts>:" { print $1 }' -) +end_intr=0x$($nm -p "$vmlinux" | + sed -E -n '/\s+[[:alpha:]]\s+__end_interrupts\s*$/{s///p;q}') if [ "$end_intr" = "0x" ]; then exit 0 fi |