Subject: Re: Porting NetBSD to the GameCube
To: None <port-powerpc@netbsd.org>
From: Water NB <netbsd78@126.com>
List: port-powerpc
Date: 11/11/2005 20:17:03
--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 11, 2005 at 12:05:04PM +0100, St?phane Witzmann wrote:
> Hello
>=20
> I'm trying to port NetBSD to the GameCube (but don't expect something big
> right now). So far, I have gathered code from other ppc architectures,
> removed all the I could from it, and made a minimalistic kernel config
> file. So I've got something that builds. Now I'm trying to set the entry
> point to 0x80003100, but the building fails. Some help would be very
> appreciated. Below are the details :
>=20
> #      link  TEST/netbsd
> /home/durandil/NetBSD/gcdev/cross//tools/bin/powerpc--netbsd-ld -N -Ttext
> 0x80003100 -e __start -X -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
> locore.o(.text+0x414): In function `trapcode':
> : relocation truncated to fit: R_PPC_ADDR24 s_trap
> locore.o(.text+0x454): In function `alitrap':
> : relocation truncated to fit: R_PPC_ADDR24 s_trap
> locore.o(.text+0x4fc): In function `dsitrap':
> : relocation truncated to fit: R_PPC_ADDR24 disitrap
> locore.o(.text+0x5a4): In function `dsi601trap':
> : relocation truncated to fit: R_PPC_ADDR24 disitrap
> locore.o(.text+0x5e4): In function `extint':
> : relocation truncated to fit: R_PPC_ADDR24 extintr
> locore.o(.text+0x624): In function `decrint':
> : relocation truncated to fit: R_PPC_ADDR24 decrintr
> locore.o(.text+0x8a0): In function `ddblow':
> : relocation truncated to fit: R_PPC_ADDR24 u_trap
> locore.o(.text+0x8c4): In function `ddblow':
> : relocation truncated to fit: R_PPC_ADDR24 ddbtrap
> locore.o(.text+0xcfc): In function `sctrap':
> : relocation truncated to fit: R_PPC_ADDR24 s_sctrap
>=20
> #       $NetBSD: std.gamecube $
> #
> # standard, required NetBSD/gamecube 'options'
>=20
> machine         gamecube powerpc
>=20
> options         PPC_OEA         # Support Motorola PPC60x CPUs
> makeoptions     PPCDIR=3D"oea"    # Tell Makefile.powerpc what dir to use
>=20
> options         EXEC_ELF32      # exec ELF binaries
> options         EXEC_SCRIPT     # exec #! scripts
>=20
> options         INTSTK=3D0x2000
>=20
> makeoptions     TEXTADDR=3D0x80003100
>=20
> See http://www.gcdev.com/download/yet_another_gamecube_doc.html.tar.gz for
> technical information on the GameCube.
> Thanks.
>=20
> St?phane Witzmann
>=20
>=20
>=20
>=20
It seems that is a problem of long-jump.
short-jump of PowerPC is in a range of only 32M (25 bit)
You can try CC option -mlong-calls

--UlVJffcvxoiEqYs2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFDdIu/NbX1TGZvxFURAne+AKDa0yF54j0P5Z8UgbvHtjI1uoVT1gCglM6N
KmOkWmAUSDYj++Cy8VJaMTM=
=8N6V
-----END PGP SIGNATURE-----

--UlVJffcvxoiEqYs2--