lkml.org 
[lkml]   [2009]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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),
>> and now with parisc too.
>>
>> The only way to fix it is to move one of the offending
>> variables to __initdata.
>> There is two variales to consider - the compiler only
>> mention one of them.

Yes.
It seems this was already once described on the parisc mailing list:
http://article.gmane.org/gmane.linux.ports.parisc/1816

Helge


>>
>> Trying to declare the variables const etc usually has
>> no good effect.
>
> So why would it be happening in the NFSroot case, but not in
> do_mounts.c? They're both using the standard __setup() macro with a
> constant string, and an __init function argument.
>
> Futhermore, when grepping for '__initconst', it seems that the
> combination with 'static const' is the norm rather than the exception.



\
 
 \ /
  Last update: 2009-08-05 21:51    [W:0.057 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site