Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-08 Thread Jan Beulich
>Al posted the following: > >; 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:

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-08 Thread Sam Ravnborg
On Fri, Feb 08, 2008 at 08:14:11AM +, Jan Beulich wrote: > >I cannot see any other way out of this than to loose all the newly added > >consts. We have to different behavior across platforms to find a suitable > >solution that is reliable. > > > >[Kept rest of mail as I added Jan - hope he

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-08 Thread Jan Beulich
>I cannot see any other way out of this than to loose all the newly added >consts. We have to different behavior across platforms to find a suitable >solution that is reliable. > >[Kept rest of mail as I added Jan - hope he have some ideas to throw in]. I'd first of all need a better

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-08 Thread Sam Ravnborg
On Fri, Feb 08, 2008 at 08:14:11AM +, Jan Beulich wrote: I cannot see any other way out of this than to loose all the newly added consts. We have to different behavior across platforms to find a suitable solution that is reliable. [Kept rest of mail as I added Jan - hope he have some

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-08 Thread Jan Beulich
Al posted the following: ; 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

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-07 Thread Sam Ravnborg
On Thu, Feb 07, 2008 at 01:33:50PM -0500, Chuck Ebbert wrote: > On 02/03/2008 08:08 AM, Al Viro wrote: > > > > 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

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-07 Thread Chuck Ebbert
On 02/03/2008 08:08 AM, Al Viro wrote: > > 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? This ugly hackset

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-07 Thread Sam Ravnborg
On Thu, Feb 07, 2008 at 01:33:50PM -0500, Chuck Ebbert wrote: On 02/03/2008 08:08 AM, Al Viro wrote: 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

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-07 Thread Chuck Ebbert
On 02/03/2008 08:08 AM, Al Viro wrote: 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? This ugly hackset was

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Olivier Galibert
On Sun, Feb 03, 2008 at 09:02:08PM +, Al Viro wrote: > On ppc64 relocs => r/w, AFAICS. On other targets we might have any number > of other rules. And -fpic/PIC => (relocs => r/w) because of the DT_TEXTREL crap. Not of immediate interest to the kernel though. OG. -- To unsubscribe from

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Al Viro
On Sun, Feb 03, 2008 at 09:30:02PM +0100, Sam Ravnborg wrote: > And I'm suprised to see that gcc thinks bar is writeable. > If I try to assign it gcc error out as expected. That's because "not modifiable" and "goes into r/o section" are not the same thing. The former belongs to C and is

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Sam Ravnborg
On Sun, Feb 03, 2008 at 06:02:34PM +, Al Viro wrote: > On Sun, Feb 03, 2008 at 06:26:35PM +0100, Sam Ravnborg wrote: > > On Sun, Feb 03, 2008 at 01:08:44PM +, Al Viro wrote: > > > ; cat >a.c <<'EOF' > > > const char foo[] __attribute__ ((__section__(".blah"))) = ""; > > > const char *

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Al Viro
On Sun, Feb 03, 2008 at 06:26:35PM +0100, Sam Ravnborg wrote: > On Sun, Feb 03, 2008 at 01:08:44PM +, Al Viro wrote: > > ; cat >a.c <<'EOF' > > const char foo[] __attribute__ ((__section__(".blah"))) = ""; > > const char * const bar __attribute__((__section__(".blah"))) = ""; > > EOF > > ; gcc

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Sam Ravnborg
On Sun, Feb 03, 2008 at 01:08:44PM +, Al Viro wrote: > ; 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

section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Al Viro
; 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

section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Al Viro
; 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

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Sam Ravnborg
On Sun, Feb 03, 2008 at 01:08:44PM +, Al Viro wrote: ; 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 ;

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Al Viro
On Sun, Feb 03, 2008 at 06:26:35PM +0100, Sam Ravnborg wrote: On Sun, Feb 03, 2008 at 01:08:44PM +, Al Viro wrote: ; cat a.c 'EOF' const char foo[] __attribute__ ((__section__(.blah))) = ; const char * const bar __attribute__((__section__(.blah))) = ; EOF ; gcc -m32 -S a.c ; gcc

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Sam Ravnborg
On Sun, Feb 03, 2008 at 06:02:34PM +, Al Viro wrote: On Sun, Feb 03, 2008 at 06:26:35PM +0100, Sam Ravnborg wrote: On Sun, Feb 03, 2008 at 01:08:44PM +, Al Viro wrote: ; cat a.c 'EOF' const char foo[] __attribute__ ((__section__(.blah))) = ; const char * const bar

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Al Viro
On Sun, Feb 03, 2008 at 09:30:02PM +0100, Sam Ravnborg wrote: And I'm suprised to see that gcc thinks bar is writeable. If I try to assign it gcc error out as expected. That's because not modifiable and goes into r/o section are not the same thing. The former belongs to C and is

Re: section breakage on ppc64 (aka __devinitconst is broken by design)

2008-02-03 Thread Olivier Galibert
On Sun, Feb 03, 2008 at 09:02:08PM +, Al Viro wrote: On ppc64 relocs = r/w, AFAICS. On other targets we might have any number of other rules. And -fpic/PIC = (relocs = r/w) because of the DT_TEXTREL crap. Not of immediate interest to the kernel though. OG. -- To unsubscribe from this