Oracle® Solaris 11.2 Linkers and Libraries Guide

Exit Print View

Updated: July 2014
 
 

Register Symbols

The SPARC architecture supports register symbols, which are symbols that initialize a global register. A symbol table entry for a register symbol contains the entries that are listed in the following table.

Table 12-25  SPARC: ELF Symbol Table Entry: Register Symbol
Field
Meaning
st_name
Index into the string table for the name of the symbol, or the value 0 for a scratch register.
st_value
Register number. See the ABI manual for integer register assignments.
st_size
Unused (0).
st_info
Bind is typically STB_GLOBAL, type must be STT_SPARC_REGISTER.
st_other
Unused (0).
st_shndx
SHN_ABS if this object initializes this register symbol,SHN_UNDEF otherwise.

The register values that are defined for SPARC are listed in the following table.

Table 12-26  SPARC: ELF Register Numbers
Name
Value
Meaning
STO_SPARC_REGISTER_G2
0x2
%g2
STO_SPARC_REGISTER_G3
0x3
%g3

Absence of an entry for a particular global register means that the particular global register is not used at all by the object.