www.delorie.com/gnu/docs/gdb/stabs_48.html   search  
Buy the book!


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2 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.

6.2.1 Transformations on Static Variables  
6.2.2 Transformations on Global Variables  
6.2.3 Transformations of Stabs in separate sections  For some object file formats, things are a bit different.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003