AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

(�

� SCNHDR ( 4) SCNHDR ( 4) NAME scnhdr - section header for a common object file SYNOPSIS #include 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. struct scnhdr { } ; char long long long long long long unsigned short unsigned short long s_name[SYMNMLEN]; I* section name *I s_paddr; I* physical address *I s_vaddr; I* virtual address *I s_size; I* section size *I s_scnptr; I* file ptr to raw data *I s_relptr; I* file ptr to relocation *I s_lnnoptr; I* file ptr to line numbers *I s_nreloc; I* # reloc entries *I s_nlnno; I* # line number entries *I s_flags; I* flags *I File pointers are byte offsets into the file; they can be used as the offset in a call to fs eek(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( l ), fseek(3S), a. out( 4). - 1 -

�<br />

SCNHDR ( 4) SCNHDR ( 4)<br />

NAME<br />

scnhdr - section header for a common object file<br />

SYNOPSIS<br />

#include <br />

DESCRIPTION<br />

Every common object file has a table of section headers to specify<br />

the layout of the data within the file. Each section within an<br />

object file has its own header. The C structure appears below.<br />

struct scnhdr<br />

{<br />

} ;<br />

char<br />

long<br />

long<br />

long<br />

long<br />

long<br />

long<br />

unsigned short<br />

unsigned short<br />

long<br />

s_name[SYMNMLEN]; I* section name *I<br />

s_paddr; I* physical address *I<br />

s_vaddr; I* virtual address *I<br />

s_size; I* section size *I<br />

s_scnptr; I* file ptr to raw data *I<br />

s_relptr; I* file ptr to relocation *I<br />

s_lnnoptr; I* file ptr to line numbers *I<br />

s_nreloc; I* # reloc entries *I<br />

s_nlnno; I* # line number entries *I<br />

s_flags; I* flags *I<br />

File pointers are byte offsets into the file; they can be used as the<br />

offset in a call to fs eek(3S). If a section is initialized, the file contains<br />

the actual bytes. An uninitialized section is somewhat<br />

different. It has a size, symbols defined in it, and symbols that<br />

refer to it. But it can have no relocation entries, line numbers, or<br />

data. Consequently, an uninitialized section has no raw data in<br />

the object file, and the values for s_scnptr, s_relptr, s_lnnoptr ,<br />

s_nreloc, and s_nlnno are zero.<br />

SEE ALSO<br />

ld( l ), fseek(3S), a. out( 4).<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!