You are probably crashing on the lret at the bottom of the entry function in i386/head.S. If you set up gdb, you should be able to stop execution right before the lret (if you set a breakpoint at the ElF entrypoint, the offending instruction is only 7 or 8 instructions past the entry). I would like to know what is on the stack at this point ( dump the two dwords at %esp). I'm guessing that the stack is wrong, and thats causing the triple fault.
Jordan
Yes, it did crash exactly at the lret of the _entry function. After trying to understand some of the funkiness in head.S i came up with following patch which did fix the problem but i should probably still look whats going wrong with the original code. Its get getting quite late around here so I'll just post what i have and get some sleep first. ;)
Let the linker figure out the correct address and just CALL the start_main entry point.
Signed-off-by: Klaus Schnass dev@stuffit.at