Subject: Re: relocation truncated to fit: R_X86_64_32S
To: None <port-amd64@NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-amd64
Date: 10/07/2007 13:50:11
On Sun, Oct 07, 2007 at 12:19:22PM +0200, Manuel Bouyer wrote:
> On Sat, Oct 06, 2007 at 06:45:36PM +0200, Manuel Bouyer wrote:
> > Hi,
> > I did some changes to the amd64 kernel sources, and when I try to
> > link I get things like:
> > ../../../../arch/amd64/amd64/locore.S:(.text+0x227b): relocation truncated to fit: R_X86_64_32S against symbol `HYPERVISOR_shared_info' defined in COMMON section in xpmap.o
> > (yes, I'm working on amd64 support for Xen :)
> > 
> > I get this only for locore.S, for symbols from various sources. The file
> > looks like:
> > locore.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped
> > xpmap.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (SYSV), not stripped
> > 
> > The .code32 section of locore.S is inside #ifndef XEN (I checked with
> > gcc -E that it's not there). Any idea what in locore.S could cause this ?
> 
> More details:
> Here's the full output:
> #      link  XEN3_DOMU/netbsd
> /dsk/l1/misc/bouyer/tmp/amd64/obj/dsk/l1/misc/bouyer/current/src/tooldir/bin/x86_64--netbsd-ld -Map netbsd.map --cref -T ../../../../arch/amd64/conf/kern.ldscript.Xen -Ttext c0100000 -e start -X -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
> locore.o: In function `start':

Sorry for the noise. I forgot to change the link address here. With the
proper value these relocation issues are gone.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--