This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: mips g++ and __main?


Mile Davidovic wrote:
I am using mips g++ compiler. I am wondering is it enaugh to call _init in
crt0.S before
jumping to main or I should call some __main function?

This initialization is very target dependent. Since you didn't specify the target, I can't give a definite answer. Generally, you only need to call one of them, which ever one is used by the target. Generally, ELF targets use _init, and old targets used __main, but there are exceptions. You probably should look at the libgloss directory of the newlib project on sources.redhat.com which contains example working crt0.S files for a number of embedded targets.


--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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