]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.4.2/parisc-fix-boot-failure-on-32-bit-systems-caused-by-branch-stubs-placed-before-.text.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 3.4.2 / parisc-fix-boot-failure-on-32-bit-systems-caused-by-branch-stubs-placed-before-.text.patch
CommitLineData
53a333c3
GKH
1From ed5fb2471b7060767957fb964eb1aaec71533ab1 Mon Sep 17 00:00:00 2001
2From: John David Anglin <dave.anglin@bell.net>
3Date: Thu, 17 May 2012 10:34:34 -0400
4Subject: PARISC: fix boot failure on 32-bit systems caused by branch stubs placed before .text
5
6From: John David Anglin <dave.anglin@bell.net>
7
8commit ed5fb2471b7060767957fb964eb1aaec71533ab1 upstream.
9
10In certain configurations, the resulting kernel becomes too large to boot
11because the linker places the long branch stubs for the merged .text section
12at the very start of the image. As a result, the initial transfer of control
13jumps to an unexpected location. Fix this by placing the head text in a
14separate section so the stubs for .text are not at the start of the image.
15
16Signed-off-by: John David Anglin <dave.anglin@bell.net>
17Signed-off-by: James Bottomley <JBottomley@Parallels.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20---
21 arch/parisc/kernel/vmlinux.lds.S | 6 ++++--
22 1 file changed, 4 insertions(+), 2 deletions(-)
23
24--- a/arch/parisc/kernel/vmlinux.lds.S
25+++ b/arch/parisc/kernel/vmlinux.lds.S
26@@ -50,8 +50,10 @@ SECTIONS
27 . = KERNEL_BINARY_TEXT_START;
28
29 _text = .; /* Text and read-only data */
30- .text ALIGN(16) : {
31+ .head ALIGN(16) : {
32 HEAD_TEXT
33+ } = 0
34+ .text ALIGN(16) : {
35 TEXT_TEXT
36 SCHED_TEXT
37 LOCK_TEXT
38@@ -65,7 +67,7 @@ SECTIONS
39 *(.fixup)
40 *(.lock.text) /* out-of-line lock text */
41 *(.gnu.warning)
42- } = 0
43+ }
44 /* End of text section */
45 _etext = .;
46