This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Fix .sbss for ELF/ppc64 (Re: Why does ELF/ppc expect.plt NOBITS?)
> > Where can I get the current ppc and ppc64 psABI? The ppc psABI I have
> > says .plt is SHT_PROGBITS and .sbss is SHT_NOBITS.
>
> It looks like there is a typo in my copy. .plt is SHT_NOBITS. But
> what should .sbss be for ppc64? If it is SHT_NOBITS like ppc, here
> is a patch to fix testcases
Here's the relevant section out of the abi:
http://www.linuxbase.org/spec/ELF/ppc64/PPC-elf64abi.txt
Special Sections
----------------
Various sections hold program and control information. The sections
listed in the following table are used by the system and have the
types and attributes shown.
Name Type Attributes
.glink SHT_PROGBITS SHF_ALLOC + SHF_EXECINSTR
.got SHT_PROGBITS SHF_ALLOC + SHF_WRITE
.toc SHT_PROGBITS SHF_ALLOC + SHF_WRITE
.tocbss SHT_NOBITS SHF_ALLOC + SHF_WRITE
.plt SHT_NOBITS SHF_ALLOC + SHF_WRITE
Note: the .plt section on the 64-bit PowerPC is of type SHT_NOBITS,
not SHT_PROGBITS as on most other processors.
Special sections are described below.
Name Description
.glink This section may be used to hold the global linkage table which
aids the procedure linkage table. See Procedure Linkage Table
in Chapter 5 for more information.
.got This section may be used to hold the Global Offset Table, or
GOT. See The Toc Section and Coding Examples in Chapter 3
and Global Offset Table in Chapter 5 for more information.
.toc This section may be used to hold the initialized Table of
Contents, or TOC. See TOC, below, The Toc Section and Coding
examples in Chapter 3 and Global Offset Table in Chapter 5
for more information.
.tocbss This section may be used to hold the uninitialized portions
of the TOC. This data may also be stored as zero-initialized
data in a .toc section.
.plt This section holds the procedure linkage table. See Procedure
Linkage Table in Chapter 5 for more information.
Note: tools which support this ABI are not required to use these
sections precisely as defined here, and indeed are not required to use
them at all. The true use of a section is defined by the relocation
information and by the code which refers to it. However, if tools use
these sections, they are required to give them the types and
attributes specified in the above table.
-eric
--
Eric Christopher <echristo@redhat.com>