Frans Pop | 2 Aug 00:10
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Friday 31 July 2009, Frans Pop wrote:
> While compiling v2.6.31-rc4-294-gf5886c7 for parisc (64-bits) I ran
> into the following compilation error:
>
> /home/fjp/projects/kernel/linux-2.6/fs/nfs/nfsroot.c:403:
>     error: __setup_str_nfs_root_setup causes a section type conflict
> make[7]: *** [fs/nfs/nfsroot.o] Error 1

Helge Deller alerted me to the fact that the config I sent did not have 
CONFIG_ROOT_NFS set. I must have sent the config I used after disabling 
NFS because of the error :-/

But I can still reproduce the error with .31-rc5 and the attached config.

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.31-rc5
# Sun Aug  2 00:04:27 2009
#
CONFIG_PARISC=y
CONFIG_MMU=y
CONFIG_STACK_GROWSUP=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
(Continue reading)

Trond Myklebust | 3 Aug 20:23
Picon
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Sun, 2009-08-02 at 00:10 +0200, Frans Pop wrote:
> On Friday 31 July 2009, Frans Pop wrote:
> > While compiling v2.6.31-rc4-294-gf5886c7 for parisc (64-bits) I ran
> > into the following compilation error:
> >
> > /home/fjp/projects/kernel/linux-2.6/fs/nfs/nfsroot.c:403:
> >     error: __setup_str_nfs_root_setup causes a section type conflict
> > make[7]: *** [fs/nfs/nfsroot.o] Error 1
> 

If you do a 'make fs/nfs/nfsroot.i', and then look at the resulting file
fs/nfs/nfsroot.i, what does the line that defines
'__setup_str_nfs_root_setup' look like?

Cheers
  Trond

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Frans Pop | 3 Aug 21:21
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Monday 03 August 2009, Trond Myklebust wrote:
> > > /home/fjp/projects/kernel/linux-2.6/fs/nfs/nfsroot.c:403:
> > >     error: __setup_str_nfs_root_setup causes a section type
> > > conflict
>
> If you do a 'make fs/nfs/nfsroot.i', and then look at the resulting
> file fs/nfs/nfsroot.i, what does the line that defines
> '__setup_str_nfs_root_setup' look like?

$ grep __setup_str_nfs_root_setup fs/nfs/nfsroot.i

static const char __setup_str_nfs_root_setup[] __attribute__ 
((__section__(".init.rodata"))) __attribute__((aligned(1))) = "nfsroot="; 
static struct obs_kernel_param __setup_nfs_root_setup 
__attribute__((__used__)) __attribute__ ((__section__(".init.setup"))) 
__attribute__((aligned((sizeof(long))))) = { __setup_str_nfs_root_setup, 
nfs_root_setup, 0 };
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Trond Myklebust | 3 Aug 21:47
Picon
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Mon, 2009-08-03 at 21:21 +0200, Frans Pop wrote:
> On Monday 03 August 2009, Trond Myklebust wrote:
> > > > /home/fjp/projects/kernel/linux-2.6/fs/nfs/nfsroot.c:403:
> > > >     error: __setup_str_nfs_root_setup causes a section type
> > > > conflict
> >
> > If you do a 'make fs/nfs/nfsroot.i', and then look at the resulting
> > file fs/nfs/nfsroot.i, what does the line that defines
> > '__setup_str_nfs_root_setup' look like?
> 
> $ grep __setup_str_nfs_root_setup fs/nfs/nfsroot.i
> 
> static const char __setup_str_nfs_root_setup[] __attribute__ 
> ((__section__(".init.rodata"))) __attribute__((aligned(1))) = "nfsroot="; 
> static struct obs_kernel_param __setup_nfs_root_setup 
> __attribute__((__used__)) __attribute__ ((__section__(".init.setup"))) 
> __attribute__((aligned((sizeof(long))))) = { __setup_str_nfs_root_setup, 
> nfs_root_setup, 0 };

Yup. That matches what I get on an x86_64 platform, where it appears to
compile without any trouble. I can see no reason why it shouldn't
compile on parisc too. In fact you should have tons of these in
init/do_mounts.c: do they generate compile errors too?

Cheers
  Trond

Frans Pop | 3 Aug 22:57
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Monday 03 August 2009, Trond Myklebust wrote:
> On Mon, 2009-08-03 at 21:21 +0200, Frans Pop wrote:
> > On Monday 03 August 2009, Trond Myklebust wrote:
> > > > > /home/fjp/projects/kernel/linux-2.6/fs/nfs/nfsroot.c:403:
> > > > >     error: __setup_str_nfs_root_setup causes a section type
> > > > > conflict
> > >
> > > If you do a 'make fs/nfs/nfsroot.i', and then look at the resulting
> > > file fs/nfs/nfsroot.i, what does the line that defines
> > > '__setup_str_nfs_root_setup' look like?
> >
> > $ grep __setup_str_nfs_root_setup fs/nfs/nfsroot.i
> >
> > static const char __setup_str_nfs_root_setup[] __attribute__
> > ((__section__(".init.rodata"))) __attribute__((aligned(1))) = "nfsroot=";
> > static struct obs_kernel_param __setup_nfs_root_setup __attribute__((__used__))
> > __attribute__ ((__section__(".init.setup")))
> > __attribute__((aligned((sizeof(long))))) = { __setup_str_nfs_root_setup,
> > nfs_root_setup, 0 }; 
>
> Yup. That matches what I get on an x86_64 platform, where it appears to
> compile without any trouble. I can see no reason why it shouldn't
> compile on parisc too. In fact you should have tons of these in
> init/do_mounts.c: do they generate compile errors too?

Yes, that does have similar constructs, but that does compiles OK:

$ make init/do_mounts.o
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
(Continue reading)

Trond Myklebust | 3 Aug 23:07
Picon
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Mon, 2009-08-03 at 22:57 +0200, Frans Pop wrote:
> $ make init/do_mounts.o
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-parisc
>   CALL    scripts/checksyscalls.sh
>   CC      init/do_mounts.o
> 
> while:
> 
> $ make fs/nfs/nfsroot.o
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-parisc
>   CALL    scripts/checksyscalls.sh
>   CC      fs/nfs/nfsroot.o
> fs/nfs/nfsroot.c:403: error: __setup_str_nfs_root_setup causes a section type 
> conflict

To me that looks like some kind of compiler bug. There appears to be
nothing incorrect about the c code generated by the preprocessor.

Just out of interest, could you do

'make fs/nfs/nfsroot.s'

and send us the resulting file?

Cheers
  Trond
(Continue reading)

Frans Pop | 3 Aug 23:34
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Monday 03 August 2009, Trond Myklebust wrote:
> On Mon, 2009-08-03 at 22:57 +0200, Frans Pop wrote:
> > $ make fs/nfs/nfsroot.o
> >   CHK     include/linux/version.h
> >   CHK     include/linux/utsrelease.h
> >   SYMLINK include/asm -> include/asm-parisc
> >   CALL    scripts/checksyscalls.sh
> >   CC      fs/nfs/nfsroot.o
> > fs/nfs/nfsroot.c:403: error: __setup_str_nfs_root_setup causes a
> > section type conflict
>
> To me that looks like some kind of compiler bug. There appears to be
> nothing incorrect about the c code generated by the preprocessor.

Compiler is gcc 4.3.3.

> Just out of interest, could you do
>
> 'make fs/nfs/nfsroot.s'
>
> and send us the resulting file?

That fails with the same error, so I'm afraid not.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Sam Ravnborg | 3 Aug 23:52
Gravatar

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Mon, Aug 03, 2009 at 05:07:23PM -0400, Trond Myklebust wrote:
> On Mon, 2009-08-03 at 22:57 +0200, Frans Pop wrote:
> > $ make init/do_mounts.o
> >   CHK     include/linux/version.h
> >   CHK     include/linux/utsrelease.h
> >   SYMLINK include/asm -> include/asm-parisc
> >   CALL    scripts/checksyscalls.sh
> >   CC      init/do_mounts.o
> > 
> > while:
> > 
> > $ make fs/nfs/nfsroot.o
> >   CHK     include/linux/version.h
> >   CHK     include/linux/utsrelease.h
> >   SYMLINK include/asm -> include/asm-parisc
> >   CALL    scripts/checksyscalls.sh
> >   CC      fs/nfs/nfsroot.o
> > fs/nfs/nfsroot.c:403: error: __setup_str_nfs_root_setup causes a section type 
> > conflict
> 
> To me that looks like some kind of compiler bug.

unspecified behaviour is a better name for it.

We have two variables we have forced a section on.
One variable is marked RO by the compiler while the other is not.
This results in a section type conflict because all
symbols needs to have the same falgs.

We usually triggers this with powerpc builds (64 bit IIRC),
(Continue reading)

Trond Myklebust | 4 Aug 00:11
Picon
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Mon, 2009-08-03 at 23:52 +0200, Sam Ravnborg wrote:
> On Mon, Aug 03, 2009 at 05:07:23PM -0400, Trond Myklebust wrote:
> > On Mon, 2009-08-03 at 22:57 +0200, Frans Pop wrote:
> > > $ make init/do_mounts.o
> > >   CHK     include/linux/version.h
> > >   CHK     include/linux/utsrelease.h
> > >   SYMLINK include/asm -> include/asm-parisc
> > >   CALL    scripts/checksyscalls.sh
> > >   CC      init/do_mounts.o
> > > 
> > > while:
> > > 
> > > $ make fs/nfs/nfsroot.o
> > >   CHK     include/linux/version.h
> > >   CHK     include/linux/utsrelease.h
> > >   SYMLINK include/asm -> include/asm-parisc
> > >   CALL    scripts/checksyscalls.sh
> > >   CC      fs/nfs/nfsroot.o
> > > fs/nfs/nfsroot.c:403: error: __setup_str_nfs_root_setup causes a section type 
> > > conflict
> > 
> > To me that looks like some kind of compiler bug.
> 
> unspecified behaviour is a better name for it.
> 
> We have two variables we have forced a section on.
> One variable is marked RO by the compiler while the other is not.
> This results in a section type conflict because all
> symbols needs to have the same falgs.
> 
(Continue reading)

Helge Deller | 5 Aug 21:47
Picon
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On 08/04/2009 12:11 AM, Trond Myklebust wrote:
> On Mon, 2009-08-03 at 23:52 +0200, Sam Ravnborg wrote:
>> On Mon, Aug 03, 2009 at 05:07:23PM -0400, Trond Myklebust wrote:
>>> On Mon, 2009-08-03 at 22:57 +0200, Frans Pop wrote:
>>>> $ make init/do_mounts.o
>>>>    CHK     include/linux/version.h
>>>>    CHK     include/linux/utsrelease.h
>>>>    SYMLINK include/asm ->  include/asm-parisc
>>>>    CALL    scripts/checksyscalls.sh
>>>>    CC      init/do_mounts.o
>>>>
>>>> while:
>>>>
>>>> $ make fs/nfs/nfsroot.o
>>>>    CHK     include/linux/version.h
>>>>    CHK     include/linux/utsrelease.h
>>>>    SYMLINK include/asm ->  include/asm-parisc
>>>>    CALL    scripts/checksyscalls.sh
>>>>    CC      fs/nfs/nfsroot.o
>>>> fs/nfs/nfsroot.c:403: error: __setup_str_nfs_root_setup causes a section type
>>>> conflict
>>> To me that looks like some kind of compiler bug.
>> unspecified behaviour is a better name for it.
>>
>> We have two variables we have forced a section on.
>> One variable is marked RO by the compiler while the other is not.
>> This results in a section type conflict because all
>> symbols needs to have the same falgs.
>>
>> We usually triggers this with powerpc builds (64 bit IIRC),
(Continue reading)


Gmane