This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mips g++ and __main?
- From: James E Wilson <wilson at specifixinc dot com>
- To: mile dot davidovic at micronasnit dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 09 Feb 2005 19:11:37 -0800
- Subject: Re: mips g++ and __main?
- References: <200502031609.j13G9R6N009823@krt.neobee.net>
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