Linker and Libraries Guide

Syminfo Table

This section contains multiple entries of the type Elf32_Syminfo or Elf64_Syminfo. There is one entry in the .SUNW_syminfo section for every entry in the associated symbol table (sh_link). If this section is present in an object, additional symbol information is to be found by taking the symbol index from the associated symbol table and using that to find the corresponding Elf32_Syminfo or Elf64_Syminfo entry in this section. The associated symbol table and the Syminfo table will always have the same number of entries. Index 0 will be used to store the current version of the Syminfo table, which will be SYMINFO_CURRENT. Since symbol table entry 0 is always reserved for the UNDEF symbol table entry, this does not pose any conflicts.

An Elf32_Symfino entry has the following format:


typedef struct {
    Elf32_Half  si_boundto; /* direct bindings - symbol bound to */
    Elf32_Half  si_flags;   /* per symbol flags */
} Elf32_Syminfo;

typedef struct {
    Elf64_Half  si_boundto; /* direct bindings - symbol bound to */
    Elf64_Half  si_flags;   /* per symbol flags */
} Elf64_Syminfo;
si_flags

This is a bit-field that can have the following flags set:

Table 7-24 Syminfo flags

Name 

Value 

Meaning  

SYMINFO_FLG_DIRECT

0x01

This symbol is directly bound to an object. 

SYMINFO_FLG_COPY

0x02

This symbol is the result of a copy-relocation. 

si_boundto

Index to an entry in the .dynamic section identified by the sh_info field. This entry will identify a DT_* (DT_NEEDED) entry which will identify a dynamic object associated with the Syminfo entry. The following two entries are reserved values for si_boundto:

Table 7-25 si_boundto reserved values

Name 

Value 

Meaning  

SYMINFO_BT_SELF

0xffff

Symbol bound to self 

SYMINFO_BT_PARENT

0xfffe

Symbol bound to parent. The parent is the first object to cause this dynamic object to be loaded.