From 161bd3bf60ee2c5765455ad3e3da967d03449f4a Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Sat, 30 Nov 2013 22:07:51 +0100 Subject: parisc: fix kernel memory layout in vmlinux.ld.S When building a 64bit kernel sometimes functions in the .init section were not able to reach the standard kernel function. Main reason for this problem is, that the linkage tables (.plt, .opd, .dlt) tend to become pretty huge and thus the distance gets too big for short calls. One option to avoid this is to use the -mlong-calls compiler option, but this increases the binary size and introduces a performance penalty. Instead, with this patch we just lay out the binary differently. Init code is stored first, followed by text, R/O and finally R/W data. This means, that init and text code is now much closer to each other, which is sufficient to reach each other by short calls. Signed-off-by: Helge Deller --- arch/parisc/kernel/head.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/parisc/kernel/head.S') diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index d2d58258aea6..d4dc588c0dc1 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S @@ -41,9 +41,7 @@ END(boot_args) .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ .import $global$ /* forward declaration */ #endif /*!CONFIG_64BIT*/ - .export _stext,data /* Kernel want it this way! */ -_stext: -ENTRY(stext) +ENTRY(parisc_kernel_start) .proc .callinfo @@ -347,7 +345,7 @@ smp_slave_stext: .procend #endif /* CONFIG_SMP */ -ENDPROC(stext) +ENDPROC(parisc_kernel_start) #ifndef CONFIG_64BIT .section .data..read_mostly -- cgit v1.2.3