Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ scnhdr(4) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ld(1)

fseek(3S)

a.out(4)

SCNHDR(4)  —  Silicon Graphics

NAME

scnhdr − section header for a common object file

SYNOPSIS

#include <scnhdr.h>

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. 

structscnhdr
{
chars_name[SYMNMLEN]; /∗ section name ∗/
longs_paddr;/∗ physical address ∗/
longs_vaddr;/∗ virtual address ∗/
longs_size;/∗ section size ∗/
longs_scnptr;/∗ file ptr to raw data ∗/
longs_relptr;/∗ file ptr to relocation ∗/
longs_lnnoptr;/∗ file ptr to line numbers ∗/
unsigned shorts_nreloc;/∗ # reloc entries ∗/
unsigned shorts_nlnno;/∗ # line number entries ∗/
longs_flags;/∗ flags ∗/
} ;

File pointers are byte offsets into the file; they can be used as the offset in a call to 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 s_scnptr, s_relptr, s_lnnoptr, s_nreloc, and s_nlnno are zero. 

SEE ALSO

ld(1), fseek(3S), a.out(4). 

Version 3.6  —  December 20, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026