Article View: gnu.gcc.bug
Article #406__main
From: Christopher Maeda
Date: Wed, 15 Apr 1992 00:59
Date: Wed, 15 Apr 1992 00:59
17 lines
1106 bytes
1106 bytes
Hi, Why do all C programs call __main? The change logs seem to say __main is for C++ programs and shared libraries. The reason I care or even know about this is that I'm using gcc2 to build mach kernels which are not linked against gcc's libraries. Thus, I either have to stick a null definition of __main in mach's libraries or convince you that two wrongs don't make a right. I clearly don't need whatever __main provides and it's a bug that I should even have to think about it. A less intrusive approach to this might be to fold __main into __start. Then if you don't link with the gnu __start (or whatever function is in crt0), you don't have to worry about __main. Chris
Technical Details
Message-ID:
<9204150101.AA18863@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mc8.mach.cs.cmu.edu!cmaedaShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mc8.mach.cs.cmu.edu!cmaeda From: cmaeda@mc8.mach.cs.cmu.edu (Christopher Maeda) Subject: __main Message-ID: <9204150101.AA18863@life.ai.mit.edu> Sender: gnulists@ai.mit.edu Reply-To: cmaeda@cs.cmu.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 15 Apr 1992 00:59:55 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 18