Subject: Re: Booting beige G3 w/ OF 2.4
To: Todd Whitesel <firstname.lastname@example.org>
From: Bill Studenmund <email@example.com>
Date: 10/28/1999 14:15:58
On Wed, 27 Oct 1999, Todd Whitesel wrote:
> The GNU objcopy command can do things like this. I'm at work without a NetBSD
> machine handy, but the source should be in src/gnu/dist/binutils/objcopy.c and
> it uses libbfd (src/gnu/dist/bfd).
Not quite. In principle it should, but it doesn't.
> First run it with --help. At the bottom it should say supported targets: with
> a list. If aixcoff-rs6000 is listed, then you are in business, otherwise
> you'll need to modify the config bits and build a new libbfd, and re-link
You don't need to relink objcopy. It uses libbfd as a shared library, and
we've modified libbfd so that the right thing will just happen (the binary
doesn't know how many bfd targets there are, just the address of the table
containing them, so the count can change on the fly).
The problem is that objcopy doesn't quite work right. Because it didn't
start with a coff file, the aixcoff goop won't fill in certain fields
needed for the boot loaders to work.
I'm looking at getting somethign in our tree which will help. I'd wanted
to fix the aixcoff stuff to just do the right thing, but I haven't gotten
it working. :-(
Oh, there's another problem. Our default linker scripts make too many
sections. Loke .rodata, .sdata, .sdata2, etc.. For something to
successfuly make it to being a bootable xcoff file, it has to have just
.text, .data, and .bss sections. I have a custom ld script which will
generate just these sections. :-)
> Something like "objcopy -O elf32-powerpc netbsd.xcoff netbsd.elf" should do
> the trick once an appropriately featureful objcopy has been built.
Sholdn't that be something like objcopy -O aixcoff-rs6000 input.elf