02.07.2013 Views

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

scnhdr(4) scnhdr(4)<br />

NAME<br />

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

SYNOPSIS<br />

finclude <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 object<br />

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

struct scnhdr<br />

{<br />

char<br />

long<br />

long<br />

long<br />

long<br />

long<br />

long<br />

unsigned short s_nreloc;<br />

unsigned short s_nlnno;<br />

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

s paddr; 1* physical address */<br />

s=vaddr; 1* virtual address *1<br />

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

s_scnptr; 1* file ptr to<br />

raw data *1<br />

s_relptr; 1* file ptr to<br />

relocation */<br />

s_lnnoptr; 1* file ptr to<br />

line numbers *1<br />

1* * reloc entries *1<br />

1* * line number<br />

entries *1<br />

long 1* flags *1<br />

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

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

contains 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 the<br />

object file, and the values for s scnptr, s relptr,<br />

s_lnnoptr, s_nreloc, and s_nlnno are zero. -<br />

SEE ALSO<br />

Id(I), fseek(3S), a. out(4).<br />

1 February, 1990<br />

RevisionC

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

Saved successfully!

Ooh no, something went wrong!