From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,269b6d3e3954b114 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-26 14:48:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!freenix!enst!enst.fr!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: GNAT internals question Date: Wed, 26 Jun 2002 16:47:15 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <3D19AA89.8FAE0ECA@ktc.com> <08c501c21d12$82b87a20$6400000a@dhoos> <3D1A2EE9.5BC51A23@myob.com> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1025128082 12782 137.194.161.2 (26 Jun 2002 21:48:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 26 Jun 2002 21:48:02 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:26725 Date: 2002-06-26T16:47:15-05:00 Hi, I don't believe ada_main___elabb will ever be called because the basic structure of the Ada_Main packages is constrolled by the binder, and the generated code (purposely, I believe) doesn't need any elaboration code. If there were any elaboration code generated, it would need to be called _before_ adainit, given the rule that elaboration of a package must be done before any of the package's subprograms is called. The elaboration code for all programmer-generated code is called by adainit, so anything that the programmer can do to affect what is in the Ada_Main package is confined to the elaboration procedures called by adainit. The only initialization of data items in the Ada_Main package is done by means of literals -- i.e., no subprogram is called to do any of the initialization -- hence, the initialization is accomplished by the generation of an initialized data section within the object file. Am I making this clear? ----- Original Message ----- From: "sk" To: Sent: Wednesday, June 26, 2002 4:15 PM Subject: Re: GNAT internals question > Hi, > > "David C. Hoos, Sr." > > ... not a single instance of ada_main___elabs. > > Sorry, I mis-remembered, it is "ada_main___elabb" > I am refering to. > > So far my experience is also that it is not called > but that doesn't mean that it never is used. > > It is difficult for me to describe what I am asking, > but ... > > procedure Nothing is > begin > null; > end Nothing; > > The pragmas are to remove all external references > and dependencies on the GNAT runtime. > > Linux shell commands : > > gnatmake -c -v nothing > gnatbind -v nothing > gcc -v -c -S b~nothing.adb > > producing "b~nothing.s" which contains the elusive > "ada_main___elabb" (AMEB an acceptable acronym ?). > > The GNAT Ada main function has a structure of > > adainit > call nothing > adafinal > > I believe that when circumstances require, AMEB will > both contain useful code and be called as part of the > final binary. > > Isolating where it is called from is my goal. Prior to > "adainit", from "adainit" or between "adainit" and the > nothing call etc. > > AMEB might be a permanent and "legacy" stub, but I doubt > it. I suspect that some features of Ada and GNAT will > populate this function with useful code and call it when > necessary. > > Trying to discover the circumstances. > > Thanks :-) > > -- > ------------------------------------- > -- Merge vertically for real address > ------------------------------------- > s n p @ t . o > k i e k c c m > ------------------------------------- > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >