views:

2923

answers:

3

I am looking at uClinux system that builds the kernel with arm-linux-xxx, but builds the user apps with arm-elf-xxx.

If the apps are intended to run on linux, wouldn't it be better to build everything with arm-linux-xxx ?

Where does one set that option in the overall uClinux build config?

A: 

ELF is the binary format linux and many others use:

The ELF format has replaced older executable formats such as a.out and COFF in many Unix-like operating systems such as Linux, Solaris, IRIX, FreeBSD, NetBSD, OpenBSD, DragonFly BSD, Syllable, and HP-UX (except for 32-bit PA-RISC programs which continue to use SOM). ELF has also seen some adoption in non-Unix operating systems, such as the Itanium version of OpenVMS, and BeOS Revision 4 and later for x86 based computers (where it replaced the Portable Executable format; the PowerPC version stayed with Preferred Executable Format). The PlayStation Portable, PlayStation 2, PlayStation 3, Wii and GP2X consoles also use ELF. AmigaOS 4 and MorphOS also running on PowerPC machines, use ELF. On the Amiga platform the ELF executable has replaced the previous EHF (Extended Hunk Format) which was used on Amigas equipped with PPC processor expansion cards. The Symbian OS v9 uses E32Image[3] format that is based on ELF file format.

Most Sony Ericsson (for example, the W800i, W610, K790, etc.), some Siemens (SGOLD and SGOLD2 platforms: from Siemens C65 to S75 and BenQ-Siemens E71/EL71) and Motorola (for example, the E398, SLVR L7, v360, v3i and all phone LTE2 which has the patch apply) phones can run ELF files through the use of a patch that adds assembly code to the main firmware (Known as the ELFPack, in the underground modding culture).

Vinko Vrsalovic
A: 

I seem to remember at some point that that bit in the middle didnt matter. As already mentioned elf is the standard file format, you want to use that anyway and will get that anyway independent of the binary name. What may (or not) matter more is the calling convention, I dont know if when calling a shared library function you have to get your calling convention to match or if it is handled for you somewhere else.

dwelch
A: 

The names of the compilers don't necessarily mean anything. Depending on who built the compilers (and named them), you'll get differing results. Arguably, there is a correct name for a particular configuration, but some random compiled gcc may not be correct.

For the CodeSourcery compilers (likely the most correct names), see their platforms page for what their naming means.

Adam Goode