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: __main


"Robert Spanton" <rob@xgoat.com> writes:
> When I compile some code under windows it outputs __main, but when I
> compile it under linux I don't get it - does anyone know why?

I guess because of this #ifndef in function.c:

  #ifndef HAS_INIT_SECTION
    emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__MAIN), LCT_NORMAL,
                       VOIDmode, 0);
  #endif

NAME_MAIN is "__main" by default.

-- 
Lars Brinkhoff          http://lars.nocrew.org/     Linux, GCC, PDP-10,
Brinkhoff Consulting    http://www.brinkhoff.se/    HTTP programming


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