Symbol table

From Computer History Wiki
Jump to: navigation, search

A symbol table is a data structure found in binary files of various sorts, such as relocatable binary files (for example, UNIX a.out files). It consists of an array of elements ('entries'), each of which contains, at a minimum:

  • a symbol name
  • the symbol's value (usually an address)

Symbol table entries in relocatable binary files also usually contain other meta-information about the symbol - e.g. whether the symbol is defined (in the file), or it is an un-defined external global reference (which will have to be discovered and 'resolved' - i.e. assigned the appropriate value - during the linking process), etc.

In addition to relocatable binary files, symbol tables are often found in executable binary files, for use by a debugger.

Early on, the symbol names in such symbol tables were stored in representations such as RADIX-50, SIXBIT and SQUOZE, to absolutely minimize the amount of space needed to hold them (especially in the days of core memory, when space was at a premium). Now, ASCII is usually used.