This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: .elf to .bin (making an image)


Shaun Jackman <sjackman@ed.gray.internal> wrote:

> I'm having trouble making this work.
> My command line is...
> arm-elf-gcc -nostartfiles -L../at91 -o main.elf main.o flash.o
>  -bbinary image.bin -T./start.ld -larch
>
> [...]
>
> I get this error...
> main.o: file not recognized: File format not recognized
>
> [...]
>
> It looks like it's trying to interpret my .o files as binarires (when they
> should be elf object files, I think). How do I link the .o files as
> object files and the .bin file as a binary?

Try -belf32-arm (or whatever is the correct BFD target for ARM ELF, I'm not
sure) before main.o and see if it works better.

--
Michael Sokolov		Harhan Engineering Laboratory
Public Service Agent	International Free Computing Task Force
			International Engineering and Science Task Force
			615 N GOOD LATIMER EXPY STE #4
			DALLAS TX 75204-5852 USA

Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]