* ADA compiler and ELF object format @ 2001-11-26 13:50 Sandro Binetti 2001-11-26 19:52 ` Ted Dennison 2001-11-27 3:57 ` Robert Dewar 0 siblings, 2 replies; 4+ messages in thread From: Sandro Binetti @ 2001-11-26 13:50 UTC (permalink / raw) Hi everybody. 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. Tnx, Sandro. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ADA compiler and ELF object format 2001-11-26 13:50 ADA compiler and ELF object format Sandro Binetti @ 2001-11-26 19:52 ` Ted Dennison 2001-11-27 1:14 ` Steven Deller 2001-11-27 3:57 ` Robert Dewar 1 sibling, 1 reply; 4+ messages in thread From: Ted Dennison @ 2001-11-26 19:52 UTC (permalink / raw) 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: ADA compiler and ELF object format 2001-11-26 19:52 ` Ted Dennison @ 2001-11-27 1:14 ` Steven Deller 0 siblings, 0 replies; 4+ messages in thread From: Steven Deller @ 2001-11-27 1:14 UTC (permalink / raw) To: comp.lang.ada 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 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ADA compiler and ELF object format 2001-11-26 13:50 ADA compiler and ELF object format Sandro Binetti 2001-11-26 19:52 ` Ted Dennison @ 2001-11-27 3:57 ` Robert Dewar 1 sibling, 0 replies; 4+ messages in thread From: Robert Dewar @ 2001-11-27 3:57 UTC (permalink / raw) sandrobinetti@yahoo.com (Sandro Binetti) wrote in message news:<877f1a1d.0111260550.182cd41d@posting.google.com>... > Hi everybody. > > 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. > > Tnx, Sandro. Surely this is the kind of question that you should ask your vendor to sort out for you, since the answer is highly compiler specific. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-11-27 3:57 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-11-26 13:50 ADA compiler and ELF object format Sandro Binetti 2001-11-26 19:52 ` Ted Dennison 2001-11-27 1:14 ` Steven Deller 2001-11-27 3:57 ` Robert Dewar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox