.TH SCNHDR 4 "not on PDP-11" .SH NAME scnhdr \- section header for a common object file .SH SYNOPSIS .B #include <scnhdr.h> .SH "DESCRIPTION" Every common object file has a table of section headers to specify the layout of the data within the file. Each section within an object file has its own header. The C structure appears below. .PP .if t .RS .ta \w'struct\ \ 'u +\w'unsign'u +\w'ed\ short\ \ 'u +\w's_lnnoptr\ ;\ \ 'u .nf .lg 0 struct scnhdr { char s_name[\s-1SYMNMLEN\s+1]; /\(** section name \(**/ long s_paddr; /\(** physical address \(**/ long s_vaddr; /\(** virtual address \(**/ long s_size; /\(** section size \(**/ long s_scnptr; /\(** file ptr to raw data \(**/ long s_relptr; /\(** file ptr to relocation \(**/ long s_lnnoptr; /\(** file ptr to line numbers \(**/ unsigned short s_nreloc; /\(** # reloc entries \(**/ unsigned short s_nlnno; /\(** # line number entries \(**/ long s_flags; /\(** flags \(**/ } ; .fi .lg .if t .RE .PP File pointers are byte offsets into the file; they can be used as the offset in a call to .IR fseek (3S). If a section is initialized, the file contains the actual bytes. An uninitialized section is somewhat different. It has a size, symbols defined in it, and symbols that refer to it. But it can have no relocation entries, line numbers, or data. Consequently, an uninitialized section has no raw data in the object file, and the values for .IR s_scnptr ", " s_relptr ", " s_lnnoptr , .IR s_nreloc ", and " s_nlnno are zero. .SH "SEE ALSO" \*pld(1), fseek(3S), \*pa.out(4). '\" \%W\% .\" @(#)scnhdr.4 5.2 of 5/18/82