X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Authenticated: #10658336 Mime-Version: 1.0 (Apple Message framework v618) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: =?ISO-8859-1?Q?Werner_Sch=F6nenberger?= Subject: Re: Sequence of Symbol Allocation Date: Mon, 9 Aug 2004 07:33:35 +0200 To: djgpp AT delorie DOT com X-Mailer: Apple Mail (2.618) Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Hi Brian, thank you for the hint. I will try that out and let you know about any success. Thanks a lot Best regards, Werner > > If you define a file globals.c (below), provide a(n alias for the > entry point) symbol in your program called _main (or main if in C > code), compile it (with gcc option -fno-leading-underscore) and link > it with gcc to your other code, you should find that the symbols are > defined in order in memory and initialized to all bytes zero when your > code is called, and the names should not be prefixed by the normal _. > You might also have to change the current name of the entry point > symbol in your program to _main if it conflicts with the C startup > code: file crt0.S symbol start for gcc IIRC. > > globals.c: > short A; > short b; > long c; > short d; > double e; > short f; > short Z;