Re: [arm-gnu] EABI version 5, but target u-boot has EABI version 0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] EABI version 5, but target u-boot has EABI version 0



Hi,

2009/2/7 Brian <2nfinite@xxxxxxxxx>:
>
> On Feb 6, 2009, at 12:08 PM, Chen-Tsai Huang wrote:
>
>> I am using arm-2008q1 to compile the u-boot,
>> I got the following linker error.
>
> This is a simple problem to fix. First you need to understand that the ARM
> EABI and ARM GNU/Linux toolchains are different. The Linux kernel and
> applications are compiled with ARM GNU/Linux toolchain, while bootloaders
> are compiled with ARM EABI toolchain.
>
> U-boot is a bare-metal application, therefore use the ARM EABI toolchain.
> That is the best way to compile U-boot and other non-Linux applications. It
> is possible to compile U-boot with Linux toolchain but not recommended.
> Explanation of the error in the archives:
> http://www.codesourcery.com/archives/arm-gnu/msg02332.html

My 2 cents:
U-boot explicitly compiles its binaries for ARM with -mabi=apcs-gnu,
not EABI, so linking to any EABI compiled libgcc will cause the same
error message.
In mainline U-boot currently all libgcc-provided-routines for ARM are
also implemented in the lib_arm directory. (yes, it is dirty, but it
is done this way for ARM). So, as long as there is an implementation
in the lib_Arm directory, nothing will be used from libgcc, and this
error will not be seen, even if you use a linux destined compiler.

I noticed that this question was about an very out-dated version of
U-boot, namely 1.1.4, so that might be cause some troubles as well.

So, use a proper compiler toolchain (not EABI, but surely a bare metal
edition). Several options are possible, you can also use the ARM-ELDK
from denx.de

Kind Regards,

Remy