This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]