26
Section 1: General Information
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual Not for Distribution
Beta Version February 2, 2001
1.4.8.5. Section Number Field
Section numbers are listed in Table 1.20.
Mnemonic Section Number Meaning
N_DEBUG -2 Special symbolic debugging symbol
N_ABS -1 Absolute value
N_UNDEF 0 Undefined external symbol
N_SCNUM 1-126 Section number where symbol is defined
Table 1.20: Section Number
Section number -2 identifies symbolic debugging symbols, including structure,
union and enumeration tag names, typedefs, and filenames. Section number -1
identifies symbols that have a non-relocatable (absolute) value. Examples of
absolute-valued symbols include automatic and register variables, function
arguments, structure members and .eos symbols. The .text, .data, and .bss
sections typically default to section numbers 1, 2, and 3, respectively.
With one exception, section number 0 identifies a relocatable external symbol
that is not defined in the current file. The one exception is the external symbol
generated as the result of defining an uninitialized external variable. The ANSI C
standard permits only a single defining instance (initialized or uninitialized) of a
particular variable. To permit compatibility with early C environments, multiple
defining instances of uninitialized variables are permitted when the linker is
invoked with the
-C
command line flag. In each file where the symbol for the
uninitialized variable is defined, the section number of the symbol is 0, and the
value of the symbol is representative of the size and alignment of the symbol.
The size of the symbol occupies bits 0 – 29 and the symbol alignment occupies
bits 30 and 31. The alignment is a Sierra Systems extension to COFF where bits
30 and 31 low indicate quad alignment, bit 30 high (31 low) indicates even
alignment, and bit 31 high (30 low) indicates no alignment required. When the
files are combined into an executable object file, the linker (
-C
flag specified)
combines all the symbols of the same name into one symbol in 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 0 and a non-zero
value.