Commit e28e66f7 authored by Anton Blanchard's avatar Anton Blanchard Committed by Greg Kroah-Hartman

powerpc: Align TOC to 256 bytes

commit 5e95235c upstream.

Recent toolchains force the TOC to be 256 byte aligned. We need
to enforce this alignment in our linker script, otherwise pointers
to our TOC variables (__toc_start, __prom_init_toc_start) could
be incorrect.

If they are bad, we die a few hundred instructions into boot.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 67be82e4
...@@ -213,6 +213,7 @@ SECTIONS ...@@ -213,6 +213,7 @@ SECTIONS
*(.opd) *(.opd)
} }
. = ALIGN(256);
.got : AT(ADDR(.got) - LOAD_OFFSET) { .got : AT(ADDR(.got) - LOAD_OFFSET) {
__toc_start = .; __toc_start = .;
#ifndef CONFIG_RELOCATABLE #ifndef CONFIG_RELOCATABLE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment