From: Nicholas Piggin Date: Thu, 11 May 2017 15:56:48 +0000 (+1000) Subject: powerpc/64: Place sfpr section explicitly with the linker script X-Git-Tag: v4.13-rc1~111^2~139 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e8c688251d0e8baca1cd68992c9ef4078a0361c8;p=linux-2.6-block.git powerpc/64: Place sfpr section explicitly with the linker script Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 2f793be3d2b1..bcfda21c3179 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -115,6 +115,14 @@ SECTIONS KPROBES_TEXT IRQENTRY_TEXT SOFTIRQENTRY_TEXT + /* + * -Os builds call FP save/restore functions. The powerpc64 + * linker generates those on demand in the .sfpr section. + * .sfpr gets placed at the beginning of a group of input + * sections, which can break start-of-text offset if it is + * included with the main text sections, so put it by itself. + */ + *(.sfpr); MEM_KEEP(init.text) MEM_KEEP(exit.text)