symbol table
also: symbols, debug symbols, symbol information
A data structure that maps symbolic names (like function and variable names) to their corresponding memory addresses or values in compiled code. It's created during compilation and used by debuggers and other tools to understand program structure.
A symbol table is metadata embedded in executable files and object files that stores the relationship between human-readable names (symbols) and their memory locations or values. During compilation, the compiler generates symbols for functions, global variables, and other identifiers, then records their addresses or offsets in the symbol table.
Debuggers like gdb rely heavily on symbol tables to let you set breakpoints by function name, inspect variable values, and display stack traces with meaningful names instead of raw addresses. For example, when you run gdb ./myprogram and type break main, the debugger consults the symbol table to find where the main function actually starts in memory.
You can inspect symbol tables using tools like nm, objdump, or readelf. By default, compiled binaries include symbol tables, but they can be stripped (removed) with the strip command to reduce file size—though this makes debugging much harder.