01.01.2013 Views

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A.OUT ( 4) A.OUT (4)<br />

} AOUTHDR;<br />

Section Header<br />

The format of the section header is:<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 />

Relocation<br />

Object files have one relocation entry for each relocatable reference<br />

in the text or data. If relocation information is present, it<br />

will be in the following format:<br />

struct reloc<br />

{<br />

};<br />

long<br />

long<br />

short<br />

r_vaddr; I* (virtual) address of reference *I<br />

r_symndx; I* index into symbol table *I<br />

r_type; I* relocation type *I<br />

The start of the relocation information is s_relptr from the Section<br />

Header. If there is no relocation information, s_relptr is 0.<br />

Symbol Table<br />

The format of the symbol table header is:<br />

#define SYMNMLEN 8<br />

#define FILNMLEN 14<br />

#define SYMESZ 18 I* the size of a SYMENT *I<br />

struct syment<br />

{<br />

union<br />

{<br />

}_n;<br />

I* get a symbol name *I<br />

char n_name]SYMNMLEN];I* name of symbol *I<br />

struct<br />

{<br />

long<br />

long<br />

}_n_n;<br />

char<br />

unsigned long<br />

short<br />

unsigned short<br />

char<br />

_n_zeroes;<br />

_n_offset;<br />

I* ==OL if in string table *I<br />

I* location in string table *I<br />

* _n_nptr]2]; I* allows overlaying *I<br />

n_value;<br />

n_scnum;<br />

n_type;<br />

n_sclass;<br />

- 3 -<br />

I* value of symbol *I<br />

I* section number *I<br />

I* type and derived type *I<br />

I* storage class *I

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

Saved successfully!

Ooh no, something went wrong!