Skip to content

Commit

Permalink
powerpc: Align TOC to 256 bytes
Browse files Browse the repository at this point in the history
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.

Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Anton Blanchard authored and Michael Ellerman committed May 14, 2015
1 parent ffb2d78 commit 5e95235
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ SECTIONS
*(.opd)
}

. = ALIGN(256);
.got : AT(ADDR(.got) - LOAD_OFFSET) {
__toc_start = .;
#ifndef CONFIG_RELOCATABLE
Expand Down

0 comments on commit 5e95235

Please sign in to comment.