Re: [PATCH] x86_64: Work around Re: 2.6.14-git1 (and -git2) buildfailure on AMD64

From: Roland Dreier
Date: Sun Oct 30 2005 - 11:32:33 EST


Andi> While not correct I don't see how it should guarantee it
Andi> will work around that gcc bug on all possible gcc versions
Andi> (which show different behaviour) My patch is more
Andi> conservative and safer.

What's the gcc bug? The current fixup.c code is asking gcc to put
toshiba_ohci1394_dmi_table[] in the .init.text section. This makes
gcc think that .init.text contains writable data. Then some other
declaration in the file asks gcc to put a function in .init.text. gcc
correctly complains that text and writable data can't share a section.

If we fix toshiba_ohci1394_dmi_table[] to go into .init.data as is
intended, then gcc is happy.

The only thing remotely like a gcc bug is that the diagnostic gcc
prints does not flag toshiba_ohci1394_dmi_table[] as the problem.

Admittedly I have only tested gcc 4.0 and gcc 3.4, but given that no
one reported this problem before toshiba_ohci1394_dmi_table[] was
added, and that the __devinit declaration of an array is obviously
wrong and would cause exactly this sort of section conflict, I think
we should at least try the correct fix.

- R.
-
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/