[lkml]   [2008]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: section breakage on ppc64 (aka __devinitconst is broken by design)
On Sun, Feb 03, 2008 at 01:08:44PM +0000, Al Viro wrote:
> ; cat >a.c <<'EOF'
> const char foo[] __attribute__ ((__section__(".blah"))) = "";
> const char * const bar __attribute__((__section__(".blah"))) = "";
> ; gcc -m32 -S a.c
> ; gcc -m64 -S a.c
> a.c:2: error: bar causes a section type conflict
> ;
> That's 4.1.2 on ppc. What happens is that the second declaration
> wants to make .blah writable. We actually trigger that in ppc64
> builds on drivers/net/natsemi.c.
> Note that on ppc64 without explicit sections you have the second one land in
>, which is "aw",progbits.
> The reason why it didn't visibly bite us before is that usually __devinit...
> just expanded to nothing (unless you disable HOTPLUG, which requires
> EMBEDDED, which wasn't apparently common enough for ppc64 builds).
> Suggestions?

Hi Al.

__devinitconst were invented to cover this issue.
So use __devinitconst for const data and
__devinitdata for non-const data.

We recently had breakage in mainline with x86 64 bit
(sis190) for the exact same case.

Does this work in your ppc example or do we need
to find another solution?


 \ /
  Last update: 2008-02-03 18:29    [W:0.042 / U:0.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site