Section 1: General Information
13
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
1.4.4. Section Headers
Every object file has one section header for each section in the file. The Sierra
Systems object file has at least three section headers. The section headers
describe the organization of data within the file. Table 1.6 describes the fields of
the section header. Defined in
file_fmt.txt
are
SECTION_HDR
and
SECTION_HDR_SIZE
, the typedefs for the section header structure and section
header size, respectively.
The size of a section is always padded to a multiple of four bytes.
The file pointers are byte offsets from the beginning of the file, and can be used
to locate the start of the data, relocation, or line entries for the section.
BytesDeclaration Name Description
0-7
char sh_name
8-character null-padded section name
8-11
unsigned long sh_phys_addr
Physical address of section
12-15
unsigned long sh_virt_addr
Virtual address of section
16-19
unsigned long sh_size
Section size in bytes
20-23
unsigned long sh_data_ptr
File pointer to raw data
24-27
unsigned long sh_reloc_ptr
File pointer to relocation entries
28-31
unsigned long sh_line_nbr_ptr
File pointer to line number entries
32-33
unsigned short sh_nbr_reloc_ents
Number of relocation entries
34-35
unsigned short sh_nbr_line_ents
Number of line number entries
36-39
unsigned long sh_flags
Flags (see Table 1.7)
Table 1.6: Section Header Contents