This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: correct type for .sbss section
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Christopher Yeoh <cyeoh at samba dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 8 Jul 2002 15:41:55 +0930
- Subject: Re: correct type for .sbss section
- References: <15657.7363.901114.489091@gargle.gargle.HOWL>
On Mon, Jul 08, 2002 at 03:01:55PM +1000, Christopher Yeoh wrote:
>
> I've noticed on x86 Linux that the .sbss section produced is of type
> SHT_PROGBITS. I was wondering what the reason behind this is (and why
> its not SHT_NOBITS like the bss). I'm using gas 2.12.90.0.9.
I answered this off-line, but to save others answering too..
.sbss isn't a special section on x86. It's not mentioned in the
ELF processor supplement, so is no different than any other random
section. If you write
.section <random name>
you'd expect a SHT_PROGBITS section by default. For sections that
are defined specially, either in the ELF ABI document or in the
relevant psABI, you can write
.section <predefined name>
and have the correct type and attributes supplied. For example,
on powerpc-linux ".sbss" is special, so you will get a SHT_NOBITS
section with
.section .sbss
This of course is shorthand for
.section .sbss,"aw",@nobits
--
Alan Modra
IBM OzLabs - Linux Technology Centre