]>
Commit | Line | Data |
---|---|---|
53a333c3 GKH |
1 | From ed5fb2471b7060767957fb964eb1aaec71533ab1 Mon Sep 17 00:00:00 2001 |
2 | From: John David Anglin <dave.anglin@bell.net> | |
3 | Date: Thu, 17 May 2012 10:34:34 -0400 | |
4 | Subject: PARISC: fix boot failure on 32-bit systems caused by branch stubs placed before .text | |
5 | ||
6 | From: John David Anglin <dave.anglin@bell.net> | |
7 | ||
8 | commit ed5fb2471b7060767957fb964eb1aaec71533ab1 upstream. | |
9 | ||
10 | In certain configurations, the resulting kernel becomes too large to boot | |
11 | because the linker places the long branch stubs for the merged .text section | |
12 | at the very start of the image. As a result, the initial transfer of control | |
13 | jumps to an unexpected location. Fix this by placing the head text in a | |
14 | separate section so the stubs for .text are not at the start of the image. | |
15 | ||
16 | Signed-off-by: John David Anglin <dave.anglin@bell.net> | |
17 | Signed-off-by: James Bottomley <JBottomley@Parallels.com> | |
18 | Signed-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 |