Linker and Libraries Guide

Syminfo Table Section

The syminfo 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 is 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, defined in sys/link.h:

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

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

The elements of this structure are:

si_boundto

This index is to an entry in the .dynamic section, identified by the sh_info field, that augments the Syminfo flags. For example, a DT_NEEDED entry identifies a dynamic object associated with the Syminfo entry. The entries that follow are reserved values for si_boundto.

Table 7–28 ELF 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. 

si_flags

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

Table 7–29 ELF Syminfo Flags

Name 

Value 

Meaning 

SYMINFO_FLG_DIRECT

0x01

Has a direct reference to an external object. 

SYMINFO_FLG_COPY

0x04

Is the result of a copy-relocation. 

SYMINFO_FLG_LAZYLOAD

0x08

Has a reference to an external, lazy loadable object.