public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* section breakage on ppc64 (aka __devinitconst is broken by design)
@ 2008-02-03 13:08 Al Viro
  2008-02-03 17:26 ` Sam Ravnborg
  2008-02-07 18:33 ` Chuck Ebbert
  0 siblings, 2 replies; 11+ messages in thread
From: Al Viro @ 2008-02-03 13:08 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

; cat >a.c <<'EOF'
const char foo[] __attribute__ ((__section__(".blah"))) = "";
const char * const bar __attribute__((__section__(".blah"))) = "";
EOF
; 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
.data.rel.ro.local, 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?

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-02-08  9:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03 13:08 section breakage on ppc64 (aka __devinitconst is broken by design) Al Viro
2008-02-03 17:26 ` Sam Ravnborg
2008-02-03 18:02   ` Al Viro
2008-02-03 20:30     ` Sam Ravnborg
2008-02-03 21:02       ` Al Viro
2008-02-04  0:27         ` Olivier Galibert
2008-02-07 18:33 ` Chuck Ebbert
2008-02-07 18:54   ` Sam Ravnborg
2008-02-08  8:14     ` Jan Beulich
2008-02-08  8:47       ` Sam Ravnborg
2008-02-08  9:17         ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox