This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: gfortran generated .s file lacks main
- From: FX <fxcoudert at gmail dot com>
- To: vikram2rhyme at gmail dot com
- Cc: fortran at gcc dot gnu dot org
- Date: Mon, 13 Feb 2012 12:31:46 +0100
- Subject: Re: gfortran generated .s file lacks main
> I compiled a simple hello world program using
> gfortran for arm. I inspected the .s file generated
> using -S option. There was a MAIN__ label
> but no main.
What compiler version are you using? gfortran generates main() directly in the compiler since version 4.5.0, before that the main() is provided by libgfortranbegin (which is normally linked in if you use "gfortran" to link, but can be included by linking with "gcc -lgfortran -lgfortranbegin -lm".
FX