14
Section 1: General Information
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
The
flags
field defines the type of the section. Table 1.7 lists the definitions of the
section header flags.
Mnemonic Flag Meaning
SH_REG
0x000 Regular section: alloc'd, not reloc'd, load'd
SH_DSECT
0x001 Dummy section: not alloc'd, reloc'd, not load'd
SH_NOLOAD
0x002 No load section: alloc'd, reloc'd, not load'd
SH_RESIDENT
0x002 Resident section: alloc'd, reloc'd, not load'd
SH_GROUP
0x004 Grouped section: formed from input sections
SH_PAD
0x008 Padding section: not alloc'd, not reloc'd, load'd
SH_FILLONLY
0x008 Fill only section: filled at run-time
SH_COPY
0x010 Copy section: copied at run-time from destination address to
virtual address
SH_TEXT
0x020 Section contains executable text
SH_DATA
0x040 Section contains initialized data
SH_BSS
0x080 Section contains only uninitialized data
SH_ORG
0x100 Section contains
ORG
'd (absolute) data
SH_INFO
0x200 Comment section: not alloc'd, not reloc'd, not load'd
SH_OVERT
0x400 Overlay section: not alloc'd, reloc'd, not load'd
SH_LIB
0x800 Library section
Table 1.7: Section Header Flags
All sections, including sections with uninitialized data such as section
.bss
(blank
static storage), have an associated section header. Uninitialized sections have
symbols that refer to them and symbols that are defined in them, but they do not
have any relocation entries, line number entries, or data associated with them.
Therefore, uninitialized sections have a section header, but occupy no other
space in the object file. In the case of an uninitialized section, zeroes appear in
the fields for the number of relocation and line number entries, as well as in the
fields for all the file pointers.
1.4.5. Relocation Information
Object files have one relocation entry for each relocatable reference in a
text-type or data-type section. The relocation entries are automatically generated
by the assembler, and the information is used by the linker to resolve external
references. Table 1.8 describes the information carried in the object file for each
relocatable reference. Defined in
file_fmt.txt
are
RELOC_INFO
and
RELOC_INFO_SIZE
, the typedefs for the relocation entry structure and
relocation entry size, respectively.