Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-20-2013, 05:01 PM   #1
LQ Newbie
Registered: Nov 2012
Posts: 5

Rep: Reputation: Disabled
Using arm-elf-gcc to creat a .bin file

I have a c source file, now I want to use arm-elf-gcc to creat a .bin file which can be executed on ARM processor. How can I do this.BTW, what's the relationship between the .bin file and .elf file?
Old 01-21-2013, 02:58 PM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
What do you want the .bin file to do? Neither of those two filename extensions are commonly used in Linux, although one can imagine that a .elf file is an object module in the elf file format. .bin has no particular meaning that I know of, although it tends to be used somewhat generically to suggest that a file's content is something other than human-readable text.

Typically, executable files are named without any filename extension.

If your C source module includes main() and doesn't reference any libraries not known to the compiler, you should be able to simply add the /path/to/your/cross/compiler to $PATH, and then compile:
arm-elf-gcc -o yourProgramName yourProgramName.c
That should produce yourProgramName in the current working directory.

The above assumes a functional and conventionally built cross toolchain.

--- rod.

Last edited by theNbomr; 01-21-2013 at 03:00 PM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bin file on x86 can be run on ARM? lesca Linux - Hardware 3 09-24-2010 08:00 PM
arm-elf-gcc _sbrk errors fairuz.ismail Programming 0 07-05-2010 05:17 AM
.bin, .elf, .out - Linux file extension raedbenz Linux - Software 7 09-15-2009 12:34 AM
Arm elf gcc jotagallo Member Intro 0 04-22-2009 02:32 PM
When do i get "/arm-elf/bin/ld:cannot find -lc" while compiling my project rameshsatyavaram Linux - Newbie 0 09-10-2008 03:31 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration