1 |
On Monday 30 March 2009 08:03:01 Christopher Friedt wrote: |
2 |
> On Mon, Mar 30, 2009 at 12:08 PM, Ahmed Ammar wrote: |
3 |
> > You are saying that this code is expected to run by the bootloader (i.e. |
4 |
> > no linux) therefore shouldn't you be using a non *-linux-* ? i.e. |
5 |
> > something like armv5te-softfloat-elf? |
6 |
> |
7 |
> Yeah, it is non-linux... I just don't feel like going through the |
8 |
> trouble of building a new toolchain to compile / assemble some code |
9 |
> that doesn't require any syscalls whatsoever. It is intended to be run |
10 |
> directly from the bootloader. |
11 |
|
12 |
then you cant use any libraries/files from glibc or gcc because they're |
13 |
assuming a Linux environment. that means you need to use -nostdlib. then you |
14 |
need to provide code to setup the C runtime environment (the "start" symbol |
15 |
entry point) which will tail off to the main() function. |
16 |
|
17 |
also, the default linker script is targetting a Linux environment which means |
18 |
you'll probably also have to write your own linker script. |
19 |
-mike |