Subject: Re: compiling sparc fails...
To: None <current-users@netbsd.org>
From: Valeriy E. Ushakov <uwe@stderr.spb.ru>
List: current-users
Date: 10/07/2007 23:11:54
On Sun, Oct 07, 2007 at 14:49:32 +0200, Kurt Schreiner wrote:

>       build  libc/libc.so.12.153
> libc_pic.a(__clone.so): In function `__clone':
> /u/NetBSD/src/lib/libc/arch/sparc/sys/__clone.S:(.text+0x60): relocation truncated to fit: R_SPARC_GOT13 against symbol `_exit' defined in .text section in libc_pic.a(_exit.so)
> libc_pic.a(sigsetjmp.so): In function `__sigsetjmp14':
> /u/NetBSD/src/lib/libc/arch/sparc/gen/sigsetjmp.S:(.text+0x2c): relocation truncated to fit: R_SPARC_GOT13 against symbol `_setjmp' defined in .text section in libc_pic.a(_setjmp.so)
> libc_pic.a(compat_sigsetjmp.so): In function `sigsetjmp':
> /u/NetBSD/src/lib/libc/compat/arch/sparc/gen/compat_sigsetjmp.S:(.text+0x2c): relocation truncated to fit: R_SPARC_GOT13 against symbol `_setjmp' defined in .text section in libc_pic.a(_setjmp.so)
> collect2: ld returned 1 exit status

I guess we are now overflowing GOT and GOT13 reloc is no longer enough
to reach some of the elements.  I think the asm code that triggers
this shall be rewritten.  By the looks of it, it tries to be clever
and use jump for a tail call but plain "call" is much faster, doesn't
require setup, doesn't have offset limitations and ifdef PIC can go
away.


SY, Uwe
-- 
uwe@stderr.spb.ru                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen