Go to the previous, next section.
Before any other stabs occur, there must be a stab specifying the source
file. This information is contained in a symbol of stab type
N_SO; the string field contains the name of the file. The
value of the symbol is the start address of the portion of the
text section corresponding to that file.
With the Sun Solaris2 compiler, the desc field contains a source-language code.
Some compilers (for example, GCC2 and SunOS4 `/bin/cc') also
include the directory in which the source was compiled, in a second
N_SO symbol preceding the one containing the file name. This
symbol can be distinguished by the fact that it ends in a slash. Code
from the cfront C++ compiler can have additional N_SO symbols for
nonexistent source files after the N_SO for the real source file;
these are believed to contain no useful information.
For example:
.stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 # 100 is N_SO
.stabs "hello.c",100,0,0,Ltext0
.text
Ltext0:
Instead of N_SO symbols, XCOFF uses a .file assembler
directive which assembles to a standard COFF .file symbol;
explaining this in detail is outside the scope of this document.
Go to the previous, next section.