DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Common Object File Format (COFF)

Section headers

Every object file has a table of section headers to specify the layout of data within the file. The section header table consists of one entry for every section in the file. The information in the section header is described in ``Section header contents''.

Section header contents

Bytes Declaration Name Description
0-7 char s_name 8-character null padded section name
8-11 long int s_paddr Physical address of section
12-15 long int s_vaddr Virtual address of section
16-19 long int s_size Section size in bytes
20-23 long int s_scnptr File pointer to raw data
24-27 long int s_relptr File pointer to relocation entries
28-31 long int s_lnnoptr File pointer to line number entries
32-33 unsigned short s_nreloc Number of relocation entries
34-35 unsigned short s_nlnno Number of line number entries
36-39 long int s_flags Flags (see ``Section header flags'')

The size of a section is padded to a multiple of 4 bytes. File pointers are byte offsets that can be used to locate the start of data, relocation, or line number entries for the section. They can be readily used with the function fseek(S).


Next topic: Flags
Previous topic: Optional header declaration

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003