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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6374c2146421add0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-26 17:17:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!elvis.franken.de!chico.franken.de!uni-erlangen.de!news-nue1.dfn.de!news-lei1.dfn.de!news-fra1.dfn.de!newsfeed.hanau.net!fr.clara.net!heighliner.fr.clara.net!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Steven Deller" Newsgroups: comp.lang.ada Subject: RE: ADA compiler and ELF object format Date: Mon, 26 Nov 2001 20:14:00 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: 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 1006823862 63632 137.194.161.2 (27 Nov 2001 01:17:42 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 27 Nov 2001 01:17:42 +0000 (UTC) To: Return-Path: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 In-Reply-To: Importance: Normal Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk X-Reply-To: List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:17013 Date: 2001-11-26T20:14:00-05:00 In ELF (and COFF and a.out formats), .bss is "uninitialized" data and .data is "initialized data". Period. In BSS, there is no stored value in the object file, just recognition of "space needed" with any symbols for the structures pointing to that space. With DATA, there is a value on the disk that must be loaded into memory. You don't get to move items back and forth between these. Data are in their respective locations because the data either does, or does not, have an initial value. As you noted, eliminating an initial value moves an item from .data to .bss. No surprise. FYI, BSS per http://mist.npl.washington.edu/faq/unix-FAQ-1-3.html bss = "Block Started by Symbol" Dennis Ritchie says: Actually the acronym (in the sense we took it up; it may have other credible etymologies) is "Block Started by Symbol." It was a pseudo-op in FAP (Fortran Assembly [-er?] Program), an assembler for the IBM 704-709-7090-7094 machines. It defined its label and set aside space for a given number of words. There was another pseudo-op, BES, "Block Ended by Symbol" that did the same except that the label was defined by the last assigned word + 1. (On these machines Fortran arrays were stored backwards in storage and were 1-origin.) The usage is reasonably appropriate, because just as with standard Unix loaders, the space assigned didn't have to be punched literally into the object deck but was represented by a count somewhere. Regards, Steve "Then, after a second or so, nothing continued to happen." Steven Deller Smooth Sailing LLC 410 757 6924 deller@smsail.com > -----Original Message----- > From: comp.lang.ada-admin@ada.eu.org > [mailto:comp.lang.ada-admin@ada.eu.org]On Behalf Of Ted Dennison > Sent: Monday, November 26, 2001 2:53 PM > To: comp.lang.ada@ada.eu.org > Subject: Re: ADA compiler and ELF object format > > > In article <877f1a1d.0111260550.182cd41d@posting.google.com>, > Sandro Binetti > says... > >How coul'd I move the .data section into the .bss section of an ELF > >object? > >I've seen that leaving uninitialized the variables inside my ADA > >program does move the object allocation from the .data section into > >the .bss one. Is there another way to achieve the same result? > > > >Ah, I'm using a GHS Ada Multi Compiler for Sparc. > > You'd be pretty lucky to find someone who has messed around a > lot with object > file formats for that particular compiler hanging out here > (but it could > happen). > > You may have better luck asking Green Hills support. > > --- > T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html > > No trees were killed in the sending of this message. > However a large number of electrons were terribly inconvenienced. > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >