(x-posting to tools-linking, which is the better forum) On Wed, May 17, 2006 at 01:44:18AM +0530, vamsi krishna wrote: > Hello All, > > I have written an application in linux which reads the elf section > headers (Elf_Shdr) and gets the exact virtual address's on where > excatly BSS and DATA begin and end. The GNU ld seem to follow a > convention to name DATA as .data and BSS as .bss, just wondering if ld > on solaris also follows the same naming convention?
Generally, but there are (of course) more sections that can go into that. .data1, etc. I'd think that the program headers would be a better thing to rely upon, instead of the section headers. > On linux the names of DATA section is .data and name of BSS section is > .bss, do solaris also follow the same section header naming > conventions? also do solaris also have some utility like 'readelf > --sections' ? 'elfdump -c' dumps the section headers, 'elfdump -p' dumps the program headers. > My application tries to persist the contents of DATA and BSS and > rewrite them back. To do what? Is this an 'undump'-style thing, like emacs does? Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development
