correct type for .sbss section
Alan Modra
amodra@bigpond.net.au
Mon Jul 8 01:12:00 GMT 2002
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
More information about the Binutils
mailing list