Linker and Libraries Guide

Symbol Table Layout and Conventions

The symbols in a symbol table are written in the following order.

Two symbol tables are of special interest in the Solaris OS.

.symtab (SHT_SYMTAB)

This symbol table contains every symbol that describes the associated ELF file. This symbol table is typically non-allocable, and is therefore not available in the memory image of the process.

Global symbols can be eliminated from the .symtab by using a mapfile together with the ELIMINATE keyword. See Defining Additional Symbols with a mapfile. Local symbols can also be eliminated by using the link-editor -z redlocsym option.

.dynsym (SHT_DYNSYM)

This table contains a subset of the symbols from the .symtab table that are needed to support dynamic linking. This symbol table is allocable, and is therefore available in the memory image of the process.

The .dynsym table begins with the standard NULL symbol, followed by the files global symbols. STT_FILE symbols are typically not present in this symbol table. STT_SECTION symbols might be present if required by relocation entries.