aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2016-11-25 22:20:31 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2016-12-01 06:26:31 -0500
commitdadc4a1bb9f0095343ed9dd4f1d9f3825d7b3e45 (patch)
tree65c554daa02638fc3bcc0647a50217e1814e0485
parent409bf7f8a02ef88db5a0f2cdcf9489914f4b8508 (diff)
powerpc/64: Fix placement of .text to be immediately following .head.text
Do not introduce any additional alignment. Placement of text section will be set by fixed section macros. Without this, output section alignment defaults to 4096, which makes BookE text section start at 0x1000 when it is expected to start at 0x100. This was introduced by commit 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors") and was caught with the scripted head section checker (not yet merged). Fixes: 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors") Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 8295f51c1a5f..7394b770ae1f 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -94,8 +94,17 @@ SECTIONS
94 * detected, and will result in a crash at boot due to offsets being 94 * detected, and will result in a crash at boot due to offsets being
95 * wrong. 95 * wrong.
96 */ 96 */
97#ifdef CONFIG_PPC64
98 /*
99 * BLOCK(0) overrides the default output section alignment because
100 * this needs to start right after .head.text in order for fixed
101 * section placement to work.
102 */
103 .text BLOCK(0) : AT(ADDR(.text) - LOAD_OFFSET) {
104#else
97 .text : AT(ADDR(.text) - LOAD_OFFSET) { 105 .text : AT(ADDR(.text) - LOAD_OFFSET) {
98 ALIGN_FUNCTION(); 106 ALIGN_FUNCTION();
107#endif
99 /* careful! __ftr_alt_* sections need to be close to .text */ 108 /* careful! __ftr_alt_* sections need to be close to .text */
100 *(.text .fixup __ftr_alt_* .ref.text) 109 *(.text .fixup __ftr_alt_* .ref.text)
101 SCHED_TEXT 110 SCHED_TEXT