]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.8.5/parisc-fix-kernel-memory-layout-regarding-position-of-__gp.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.8.5 / parisc-fix-kernel-memory-layout-regarding-position-of-__gp.patch
1 From f8850abb7ba68229838014b3409460e576751c6d Mon Sep 17 00:00:00 2001
2 From: Helge Deller <deller@gmx.de>
3 Date: Sun, 9 Oct 2016 11:12:34 +0200
4 Subject: parisc: Fix kernel memory layout regarding position of __gp
5
6 From: Helge Deller <deller@gmx.de>
7
8 commit f8850abb7ba68229838014b3409460e576751c6d upstream.
9
10 Architecturally we need to keep __gp below 0x1000000.
11
12 But because of ftrace and tracepoint support, the RO_DATA_SECTION now gets much
13 bigger than it was before. By moving the linkage tables before RO_DATA_SECTION
14 we can avoid that __gp gets positioned at a too high address.
15
16 Signed-off-by: Helge Deller <deller@gmx.de>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19 ---
20 arch/parisc/kernel/vmlinux.lds.S | 7 +++++--
21 1 file changed, 5 insertions(+), 2 deletions(-)
22
23 --- a/arch/parisc/kernel/vmlinux.lds.S
24 +++ b/arch/parisc/kernel/vmlinux.lds.S
25 @@ -89,8 +89,9 @@ SECTIONS
26 /* Start of data section */
27 _sdata = .;
28
29 - RO_DATA_SECTION(8)
30 -
31 + /* Architecturally we need to keep __gp below 0x1000000 and thus
32 + * in front of RO_DATA_SECTION() which stores lots of tracepoint
33 + * and ftrace symbols. */
34 #ifdef CONFIG_64BIT
35 . = ALIGN(16);
36 /* Linkage tables */
37 @@ -105,6 +106,8 @@ SECTIONS
38 }
39 #endif
40
41 + RO_DATA_SECTION(8)
42 +
43 /* unwind info */
44 .PARISC.unwind : {
45 __start___unwind = .;