This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
CRT0 questions
- From: Chien-Lung Wu <cwu at deltartp dot com>
- To: "'newlib at sources dot redhat dot com'" <newlib at sources dot redhat dot com>
- Date: Tue, 30 Mar 2004 11:22:21 -0500
- Subject: CRT0 questions
Hi, everyone:
I created cross-compiler for our embedded project, using Powerpc (MPC8250).
It is fine to compile all my application files using cross-compiler with
newlib C-library.
But I got linking stage error when link all object files. I have several
questions about newlib. Can anyone help me out?
Q. crt0
When I generate newlib C library, I believe that the crt0 also been
generated. Since I used company-designed hardware, I need to re-write crt0.
Are there information to write crt0? Anything I got to take care when I
write the crt0?
1. what does crt0?
2. How many things got to do (init) within crt0?
3. After I finish "initialize", what is the "hook" to connect with
C-library? What function I got to
call so that the program can connect with "main()"? for example, I used
diab4.4b compiler before.
I know that the crt0 finally call __init_main to connect with program's main
function. What is the exact function for newlib C-library?)
Thanks for your help.
Chien-Lung