06.02.2013 Views

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

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.

• • • • • • • •<br />

A.out File Format A−3<br />

1 INTRODUCTION<br />

The layout of the assembler/linker/locator output file is machine<br />

independent (through being fully byte oriented), compact and accepts<br />

variable−length symbols. All chars are 1 byte, shorts are 2 bytes and<br />

longs are 4 bytes.<br />

The elements of an a.out file describe the sections in the file and the<br />

symbol debug information. These elements include:<br />

• File Header record (tk_outhead)<br />

• Section Header records (outsect)<br />

• Raw data for each section with initialized data<br />

• Relocation records (outrelo)<br />

• Name records (tk_outname)<br />

• Identifier strings<br />

• Extension Header record (exthead)<br />

• Extension records:<br />

− Segment Range records (tk_extsegm)<br />

− Allocation records (tk_extallo)<br />

The names between parentheses refer to the corresponding structures in<br />

the C include file out.h, which is included at the end of this appendix.<br />

The locate stage of l166 produces absolute object files. These files do not<br />

contain relocation records. The following figure illustrates the layout of an<br />

a.out file:<br />

File Header<br />

Section Header 1<br />

|<br />

|<br />

Section Header n<br />

Section 1 Data<br />

|<br />

|<br />

Section n Data<br />

Relocation Records<br />

Name Records

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

Saved successfully!

Ooh no, something went wrong!