GNU Info

Info Node: (stabs.info)Transformations On Symbol Tables

(stabs.info)Transformations On Symbol Tables


Prev: Symbol Table Format Up: Symbol Tables
Enter node , (file) or (file)node

Transformations on Symbol Tables
================================

   The linker concatenates object files and does fixups of externally
defined symbols.

   You can see the transformations made on stab data by the assembler
and linker by examining the symbol table after each pass of the build.
To do this, use `nm -ap', which dumps the symbol table, including
debugging information, unsorted.  For stab entries the columns are:
VALUE, OTHER, DESC, TYPE, STRING.  For assembler and linker symbols,
the columns are: VALUE, TYPE, STRING.

   The low 5 bits of the stab type tell the linker how to relocate the
value of the stab.  Thus for stab types like `N_RSYM' and `N_LSYM',
where the value is an offset or a register number, the low 5 bits are
`N_ABS', which tells the linker not to relocate the value.

   Where the value of a stab contains an assembly language label, it is
transformed by each build step.  The assembler turns it into a
relocatable address and the linker turns it into an absolute address.

Transformations On Static Variables
Transformations On Global Variables
Stab Section Transformations
For some object file formats,
things are a bit different.

automatically generated by info2www version 1.2.2.9