Ollie Lho <[EMAIL PROTECTED]> writes:

> 
> What is the defination of "valid ELF file" ?? 

More on this later...
I have a draft specification and on the next draft I will check it
into the linuxBIOS tree.

> If gcc's default crt0.S does not work, which one can ?? 

For a trivially simple one see: src/arch/i386/standalone/crt0.S

> Say, I have a hello.c like this
> 
> #include <printk.h>
> main()
> {
>       printk_debug("hello world\n");
> }
> 
> How can I build a ELF image that can be loaded by ELF boot ??
> Should I do as:
> 
>       gcc -c ube_start.S
>       gcc -c hello.c
>       gcc -nostdlib -nostartfiles -static -T ldscript.ld -o hello\
>       ube_start.o hello.o

Essentially that is what needs to be done.
 
> BTW, Can you provide a sample crt0.S and code to read LinuxBIOS table.
> Something like libgcc ??

A moderately simple and almost useful example is now in the linuxBIOS tree.
Check out src/standalone/lbbl/

Eric

Reply via email to