Skip to contentSkip to conversation

powerpc: Align TOC to 256 bytes

PATCH New Anton Blanchard 1 participant 1 message May 14, 2015 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Align TOC to 256 bytes

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.

---
 arch/powerpc/kernel/vmlinux.lds.S | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kernel/vmlinux.lds.S +1 -0
index f096e72..1db6851 100644
@@ -213,6 +213,7 @@ SECTIONS
 		*(.opd)
 	}
 
+	. = ALIGN(256);
 	.got : AT(ADDR(.got) - LOAD_OFFSET) {
 		__toc_start = .;
 #ifndef CONFIG_RELOCATABLE
Signature · 1 line
2.1.4