Page 1 of 1
config.bfd with binary?
Posted: Tue Oct 09, 2007 6:39 pm
by kubeos
Does anyone know what I should put for my default vector in config.bfd?
My executable format is binary. I've tried bfd_binary_vec and binary_vec and it doesn't recognize those. I might have to use aout or something for now and just use a linker script to make my apps compile to binary format.
Thanks in advance.
hmm
Posted: Tue Oct 09, 2007 9:03 pm
by kubeos
Actually, I suppose it would be easier to just use binary as my target when doing a cross compiler.
But still.. i586-binary doesn't work. Anyway, I'll keep looking, because I really don't want to do elf.
[EDIT] Okay, I did use i586-elf as my target and just fixed the default linker script to output "binary" with a text address of 0x0. Everything worked out that way. Now I just need to get newlib ported.
Re: hmm
Posted: Tue Oct 09, 2007 10:56 pm
by AndrewAPrice
kubeos wrote:But still.. i586-binary doesn't work. Anyway, I'll keep looking, because I really don't want to do elf.
Why not?
Posted: Wed Oct 10, 2007 11:15 am
by jnc100
By default, every libbfd compiled should contain support for
the binary output format, as well as srec, symbolsrec, tekhex and ihex. I think what you're trying to do is set the default emulation for ld, which is specified in ld/configure.tgt. You probably need to create your own emulation, but can use the elf scripts, e.g.
emulparams/binary.sh:
Code: Select all
SCRIPT_NAME=elf
OUTPUT_FORMAT="binary"
TEXT_START_ADDR=0
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH=i386
MACHINE=
NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=no
GENERATE_PIE_SCRIPT=no
although this is entirely untested. Using it the way you are doing is as good as, however.
Regards,
John.