Conrad Parker wrote:
> crt0.o is just another object file; it has an entry point the system
> starts executing at, perhaps sets up some system-dependent
> structures (which by the sounds of it you won't have to worry about)
> and jumps into your code. When you roll your own crt0, compile with
> -nostartfiles in your linker flags so as not to link against the
> standard gcc crt0.o.
>
> From your point of view, the most important thing crt0 does is provide
> an entry point for your program and jump into your main(). Jumping into
> main is easy; the entry point you want depends on your ROM loader.
> There's not really much else to say about that, it depends on your
> ROM etc.
>
> Of course, without an OS under you you'll be compiling without libc
> (have a good read of the gcc info page for all the options required ;)
> and duplicating a whole lot of OS-like functionality depending on
> what your code's doing. Have fun :)
>
> Conrad.
How does the linker know where to point to resources such as variables
etc, I can understand malloc, because you roll you own, but what about
variables which are allocated by the compiler, linker ?
Do you know of any good references ?
Cheers
Erich