Subject: Re: CVS commit: src/sys/arch/macppc/stand
To: Matt Thomas <matt@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 12/10/2003 20:27:37
--h56sxpGKRmy85csR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 11, 2003 at 12:27:42AM +0000, Matt Thomas wrote:
>=20
> Module Name:	src
> Committed By:	matt
> Date:		Thu Dec 11 00:27:42 UTC 2003
>=20
> Modified Files:
> 	src/sys/arch/macppc/stand: Makefile
> 	src/sys/arch/macppc/stand/fixcoff: Makefile fixcoff.c
> 	src/sys/arch/macppc/stand/ofwboot: Makefile
> Removed Files:
> 	src/sys/arch/macppc/stand/fixcoff: nb_progname.c
>=20
> Log Message:
> Convert fixcoff into a true host tool by making it under tools.

Another alternative is to fix the binutils xcoff support.

We have fixcoff because of an issue with binutils and xcoff files and=20
objcopy.

xcoff files come in two varieties, "small header" and "big header". The=20
"big header" ones have some extra fields, and the OF boot loader in=20
powermacs need some of those fields filled in.

When binutils (or at least the old binutils) saves a file, it saves space=
=20
for these fields, but it doesn't fill them in. Before making our own=20
version of fixcoff, I tried to get binutils to set the fields. However for=
=20
some reason, every time I got a core dump. All I could tell was that when=
=20
it was copying an elf file to an xcoff one, it didn't allocate space for=20
the extra fields, so when I wrote to them I messed something up.

If we could make it so that objcopy when copying an elf file to an xcoff=20
one would set these fields, then we wouldn't need fixcoff.

Take care,

Bill

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

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

iD8DBQE/1/I5Wz+3JHUci9cRAmeaAJ9nkydJBvnj7hl37EdJJRqiY0daPACfQlwN
bJUhszqBgmO+Q9gHLVWaoVk=
=XQ82
-----END PGP SIGNATURE-----

--h56sxpGKRmy85csR--