Subject: Re: Build failure
To: None <port-sparc64@netbsd.org>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: port-sparc64
Date: 03/16/2007 09:46:21
On Fri, Mar 16, 2007 at 09:18:22AM +0100, Martin Husemann wrote:
> On Fri, Mar 16, 2007 at 08:51:14AM +0100, Juergen Hannken-Illjes wrote:
> > /src/lib/libc/compat/arch/sparc64/gen/compat_sigsetjmp.S:(.text+0x54): relocation truncated to fit: R_SPARC_GOT13 against symbol `longjmp' defined in .text section in libc_pic.a(compat_setjmp.so)
> > /src/lib/libc/compat/arch/sparc64/gen/compat_sigsetjmp.S:(.text+0x58): relocation truncated to fit: R_SPARC_GOT13 against symbol `_longjmp' defined in .text section in libc_pic.a(_setjmp.so)
> > collect2: ld returned 1 exit status
> 
> Could you objdump -d one of the affected objects?

Which objects?

Running the link of libc.so with -M gives:

 .text          0x00000000000a6b00      0x160 libc_pic.a(makecontext.so)
                0x00000000000a6b20                makecontext
 .text          0x00000000000a6c60       0xe0 libc_pic.a(longjmp.so)
                0x00000000000a6c60                __longjmp14
 .text          0x00000000000a6d40       0x6c libc_pic.a(sigsetjmp.so)
                0x00000000000a6d40                __sigsetjmp14
                0x00000000000a6d74                __siglongjmp14
 .text          0x00000000000a6dac       0x30 libc_pic.a(_setjmp.so)
                0x00000000000a6dbc                _longjmp
                0x00000000000a6dac                _setjmp
 .text          0x00000000000a6ddc       0xa4 libc_pic.a(setjmp.so)
                0x00000000000a6ddc                __setjmp14
 .text          0x00000000000a6e80       0x80 libc_pic.a(bswap64.so)
                0x00000000000a6e80                bswap64

> The __sigsetjmp14 for example has:
> 
> 	ldx    [%g1+_C_LABEL(__setjmp14)], %g1
> 
> Maybe the GOT has grown too big for _C_LABEL(__setjmp14) to fit into the
> 13 bit offset? Fix would be to do the full dance, like
> 
> 	set	_C_LABEL(__setjmp14), %o2
> 	ldx	[%g1+%o2], %g1
> 
> and rearange the branch around it slightly.
> 
> Martin

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)