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 is 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 Symfino entry has the following format:


typedef struct {
        Elf32_Half      si_boundto;
        Elf32_Half      si_flags;
} Elf32_Syminfo;

typedef struct {
        Elf64_Half      si_boundto;
        Elf64_Half      si_flags;
} Elf64_Syminfo;
si_flags

This is a bit-field that can have flags set, as shown in the following table.

Table 7-26 Syminfo flags

Name 

Value 

Meaning 

SYMINFO_FLG_DIRECT

0x01

This symbol has a direct reference to an external object. 

SYMINFO_FLG_COPY

0x04

This symbol is the result of a copy-relocation. 

SYMINFO_FLG_LAZYLOAD

0x08

This symbol has a reference to an external, lazy loadable object. 

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 entries that follow are reserved values for si_boundto.

Table 7-27 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.