porting crt0 and adding missing headers