summaryrefslogtreecommitdiff
path: root/arch/powerpc/Makefile.postlink
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-05-12 03:40:39 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-05-30 14:59:51 +1000
commitc494adefef9fcd0de172132e20f102d44c62fa2f (patch)
tree77dbde0b052285eaf437f98193e02388775f24d1 /arch/powerpc/Makefile.postlink
parent951eedebcdea06fdcc742c82dc347509ce0e1ba4 (diff)
powerpc/64: Tool to check head sections location sanity
Use a tool to check that the location of "fixed sections" are where we expected them to be, which catches cases the linker script can't (stubs being added to start of .text section), and which ends up being neater. Sample output: ERROR: start_text address is c000000000008100, should be c000000000008000 ERROR: see comments in arch/powerpc/tools/head_check.sh Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Fold in fix from Nick for 4.6 era toolchains] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/Makefile.postlink')
-rw-r--r--arch/powerpc/Makefile.postlink8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/Makefile.postlink b/arch/powerpc/Makefile.postlink
index 50336930e6f7..5db43ebbe2df 100644
--- a/arch/powerpc/Makefile.postlink
+++ b/arch/powerpc/Makefile.postlink
@@ -10,6 +10,9 @@ __archpost:
-include include/config/auto.conf
include scripts/Kbuild.include
+quiet_cmd_head_check = CHKHEAD $@
+ cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
+
quiet_cmd_relocs_check = CHKREL $@
ifdef CONFIG_PPC_BOOK3S_64
cmd_relocs_check = \
@@ -24,6 +27,9 @@ endif
vmlinux: FORCE
@true
+ifdef CONFIG_PPC64
+ $(call cmd,head_check)
+endif
ifdef CONFIG_RELOCATABLE
$(call if_changed,relocs_check)
endif
@@ -32,7 +38,7 @@ endif
@true
clean:
- @true
+ rm -f .tmp_symbols.txt
PHONY += FORCE clean