config.bfd with binary?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
kubeos
Member
Member
Posts: 138
Joined: Tue Jan 30, 2007 2:31 pm
Location: Kamloops BC, CANADA
Contact:

config.bfd with binary?

Post 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.
kubeos
Member
Member
Posts: 138
Joined: Tue Jan 30, 2007 2:31 pm
Location: Kamloops BC, CANADA
Contact:

hmm

Post 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.
User avatar
AndrewAPrice
Member
Member
Posts: 2309
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: hmm

Post 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?
My OS is Perception.
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post 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.
Post Reply