gcc 3.2+ alignment issue with 2.6 kernel (was Re: 2.6.0-test6 + fbpatch = dead PowerBook)

From: David Eger
Date: Tue Oct 28 2003 - 06:01:04 EST


FYI:

My issue seems to be a bad interaction of new versions of gcc (me gcc-3.2.3, him
gcc-3.3.1) with alignments in the kernel. My problems have gone away with the
following patch presented on linuxppc-dev by Sam Ravnborg. I do not know if
other platforms are affected, so similar patches might be needed elsewhere.

Why this misalignment would turn my machine into a brick even through reboots...
I do not know.

-Eger David


===== arch/ppc/kernel/vmlinux.lds.S 1.24 vs edited =====
--- 1.24/arch/ppc/kernel/vmlinux.lds.S Fri Sep 12 18:26:52 2003
+++ edited/arch/ppc/kernel/vmlinux.lds.S Sun Oct 12 20:17:25 2003
@@ -47,13 +47,17 @@

.fixup : { *(.fixup) }

- __start___ex_table = .;
- __ex_table : { *(__ex_table) }
- __stop___ex_table = .;
+ __ex_table : {
+ __start___ex_table = .;
+ *(__ex_table)
+ __stop___ex_table = .;
+ }

- __start___bug_table = .;
- __bug_table : { *(__bug_table) }
- __stop___bug_table = .;
+ __bug_table : {
+ __start___bug_table = .;
+ *(__bug_table)
+ __stop___bug_table = .;
+ }

/* Read-write section, merged into data segment: */
. = ALIGN(4096);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/