|
|
Section numbers are listed in ``Section number''.
Section number
Mnemonic | Section Number | Meaning |
---|---|---|
N_DEBUG | -2 | Special symbolic debugging symbol |
N_ABS | -1 | Absolute symbol |
N_UNDEF | 0 | Undefined external symbol |
N_SCNUM | 1-077777 | Section number where symbol is defined |
A special section number (-2) marks symbolic debugging symbols,
including structure/union/enumeration tag names, typedef
s,
and the name of the file.
A section number of -1 indicates that
the symbol has a value but is not relocatable.
Examples of absolute-valued symbols include
automatic and register variables,
function arguments, and .eos symbols.
With one exception, a section number of 0 indicates a relocatable
external symbol that is not defined in the current file.
The one exception is a multiply-defined external symbol
(i.e., FORTRAN common or an uninitialized variable-defined
external to a function in C).
In the symbol table of each file where the symbol is defined,
the section number of the symbol is 0,
and the value of the symbol is a positive number
giving the size of the symbol.
When the files are combined
to form an executable object file,
the link editor combines all the input symbols
of the same name into one symbol with the
section number of the .bss section.
The maximum size
of all the input symbols with the same name is
used to allocate space for the symbol and the value
becomes the address of the symbol.
This is the only case
where a symbol has a section number of 0 and a non-zero
value.