gfortran generated .s file lacks main

FX fxcoudert@gmail.com
Mon Feb 13 11:32:00 GMT 2012


> 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



More information about the Fortran mailing list