12
Section 1: General Information
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual Not for Distribution
Beta Version February 2, 2001
1.4.2.3. Flags
The last two bytes of the file header are flags that describe the type of the object
file. The file header flags are described in Table 1.4.
Mnemonic Flag Meaning
FH_REL_STRPD 0x01 Relocation information stripped from file
FH_EXECUTABLE 0x02 File is executable (i.e., no unresolved references)
FH_LNNO_STRPD 0x04 Line numbers stripped from file
FH_LSYMS_STRPD 0x08 Local symbols stripped from file
FH_GSYMS_STRPD 0x10 Global symbols stripped from file
FH_ERR_IN_FILE 0x80 Error in object file
Table 1.4: File Header Flags
1.4.3. Optional
Header
The optional header contains information that varies among the systems that use
COFF. Applications place all system-dependent information in the optional
header. As previously stated, system-independent COFF utilities can skip past
the system-dependent optional header to perform tasks such as dumping the
symbol table.
Bytes Declaration Name Description
0-1 unsigned short magic Magic number, 0x107
2-3 unsigned short version Version stamp
4-7 unsigned long tsize Size of text in bytes
8-11 unsigned long dsize Size of initialized data in bytes
12-15 unsigned long bsize Size of uninitialized data in bytes
16-19 unsigned long entry Program entry point
20-23 unsigned long text_start Base address of text
24-27 unsigned long data_start Base address of data
Table 1.5: Sierra Systems Optional Header Contents
The Sierra Systems optional header is 28 bytes long, and the fields of the
optional header are described in Table 1.5. The optional header is present only
on linked executable files; it is not present on assembler-generated files or
partially linked files (-r flag). Defined in file_fmt.txt are A_OUT_HDR and
A_OUT_HDR_SIZE, the typedefs for the optional header structure and optional
header size, respectively.