Section 1: General Information
11
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
1.4.2. File Header
The file header contains the 20 bytes of information shown in Table 1.3. The last
two bytes are flags that are used by the linker and other object file utilities.
Defined in
file_fmt.txt
are
FILE_HDR
and
FILE_HDR_SIZE
, the typedefs for the
file header structure and file header size, respectively.
BytesDeclaration Name Description
0-1
unsigned short fh_magic
Magic number, 0x150
2-3
unsigned short fh_nbr_sections
Number of section headers (equals the
number of sections)
4-7
unsigned long fh_time_date
Time and date stamp indicating when the
file was created (expressed as the
number of seconds since 00:00:00 GMT,
January 1, 1970)
8-11
unsigned long fh_symtab_ptr
File pointer containing the starting offset
of the symbol table
12-15
unsigned long fh_nbr_symtab_ents
Number of entries in the symbol table
16-17
unsigned short fh_size_opt_hdr
Number of bytes in the optional header
18-19
unsigned short fh_flags
Flags (see Table 1.4)
Table 1.3: File Header Contents
1.4.2.1. Magic Number
The
magic number
specifies the target machine on which the object file can be
executed. The number 0x150 identifies the object file as a 68000 family
executable file. The number 0x150 is the only number recognized by the various
Sierra Systems utilities; an error will be reported if a file that does not begin with
0x150 is encountered.
1.4.2.2. Optional Header Size
The optional header shown in Table 1.5 is system-dependent and not specified
by the COFF standard. The size of the optional header is specified in the file
header to allow system-independent object file utilities to skip past the optional
header.