Subject: Re: linux-next: sparc tree build failure

From: David Miller <[email-masked]>
Date: Sun, 03 Aug 2008 21:26:20 -0700 (PDT)

From: Stephen Rothwell <[email-masked]>
Date: Fri, 25 Jul 2008 17:05:27 +1000

> Hi Dave,
> 
> Today's linux-next build (sparc defconfig) failed like this:
> 
>   Building modules, stage 2.
> .tmp_kallsyms2.o(.rodata+0x0): In function `kallsyms_addresses':
> : relocation truncated to fit: R_SPARC_32 _text

FWIW, Sam had narrowed it down to:

commit fd593d12770d4a0d1ff095d44b96436c18479ee8
Author: Eric W. Biederman <[email-masked]>
Date:   Thu Dec 7 02:14:04 2006 +0100

    [PATCH] relocatable kernel: Kallsyms generate relocatable symbols
    
    Print the addresses of non-absolute symbols relative to _text
    so that ld will generate relocations.  Allowing a relocatable
    kernel to relocate them.  We can't actually use the symbol names
    because kallsyms includes static symbols that are not exported
    from their object files.
    
    Add the _text symbol definitions to the architectures which don't
    define it otherwise linker will fail.
    
    Signed-off-by: Eric W. Biederman <[email-masked]>
    Signed-off-by: Vivek Goyal <[email-masked]>
    Signed-off-by: Andi Kleen <[email-masked]>

and

commit 2c22d8baa98a92022acb85b0b7c6f4a60df55f47
Author: Vivek Goyal <[email-masked]>
Date:   Thu Dec 7 02:14:10 2006 +0100

    [PATCH] relocatable kernel: Fix kallsyms on avr32 after relocatable kernel changes
    
    o On some platforms like avr32, section init comes before .text and
      not necessarily a symbol's relative position w.r.t _text is positive.
      In such cases assembler detects the overflow and emits warning. This
      patch fixes it.
    
    Signed-off-by: Vivek Goyal <[email-masked]>
    Signed-off-by: Andi Kleen <[email-masked]>
    Cc: Andi Kleen <[email-masked]>
    Cc: Haavard Skinnemoen <[email-masked]>
    Signed-off-by: Andrew Morton <[email-masked]>

but I personally still can't reproduce this.  I even had the gcc-3.4.5
that's installed on my box, using defconfig just like you, and I can't
trigger this problem.