Skip to contentSkip to conversation

IA64: alignment bug in ldscript

PATCH In review Kirill Korotaev 2 participants 2 messages Dec 18, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IA64: alignment bug in ldscript

[IA64] bug in ldscript (mainstream)

Occasionally, in mainstream number of fsys entries is even. In OpenVZ it is odd and we get misaligned kernel image, which does not boot.

arch/ia64/kernel/vmlinux.lds.S renamed from linux-2.6.18-vz/arch/ia64/kernel/vmlinux.lds.S +1 -0
diff -urp ../linux-2.6.18-vz/arch/ia64/kernel/vmlinux.lds.S linux-2.6.18-vz/arch/ia64/kernel/vmlinux.lds.S
@@ -163,6 +163,7 @@ SECTIONS
 	}
 #endif
 
+  . = ALIGN(8);
    __con_initcall_start = .;
   .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET)
 	{ *(.con_initcall.init) }
#1 lore raw

Kirill Korotaev wrote on Monday, December 18, 2006 4:05 AM

Quoted 3 lines

[IA64] bug in ldscript (mainstream)

Occasionally, in mainstream number of fsys entries is even.

Is it a typo on "fsys entries is even"?

If not, then this change log is misleading. It is the instruction patch list of FSYS_RETURN that can potentially cause other data structures to be out of alignment. And number of FSYS_RETURN call site will not necessarily match number of fsys entry.

Quoted 2 lines

In OpenVZ it is odd and we get misaligned kernel image, which does not boot.

Otherwise, the patch looks fine to me.