24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

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 single remap struct fits into a single 64-bit register in user-mode but requires<br />

two registers each to pass to the kernel.<br />

3.2.3 64-Bit XCOFF Format<br />

The extended common object file format (XCOFF) combines the standard<br />

common object file format (COFF) with the TOC module format concept. This<br />

allows dynamic linking and replacement of units within an object file.<br />

Until <strong>AIX</strong> 4.2, the XCOFF format assumed that addresses were 32 bits, memory<br />

could be no larger than 2 32 bytes, and therefore, no object (csect, text section,<br />

and so on) could be larger than 2 32 bytes. The XCOFF header files contained<br />

32-bit fields for value in the symbol table, 32-bit length-fields for sections, and so<br />

on.<br />

For PowerPC’s 64-bit execution mode, these sizes are too restrictive. The reason<br />

for moving an application from 32-bit mode to 64-bit mode is to use addresses<br />

larger than 32 bits. In general, this means that all fields in XCOFF structures that<br />

can hold an address or a size should be increased to 64 bits. At the very least, it<br />

should be possible to describe a bss (common, or uninitialized data) object with a<br />

size greater than 2 32 bytes.<br />

3.2.3.1 XCOFF Design<br />

There are two XCOFF formats; one for 32-bit applications, and one for 64-bit<br />

applications. The 64-bit XCOFF differs from the 32-bit XCOFF format in several<br />

ways, as listed in the following:<br />

• The file size can be up to 2 63 bytes (rather than 2 31 bytes).<br />

• Each XCOFF section can be up to 2 63 bytes (rather than 2 31 bytes).<br />

• The virtual addresses in the process can be up to 2 64 bytes (rather than 2 32 ).<br />

• The offsets of objects within the XCOFF file can be up to 2 63 bytes (rather<br />

than 2 31 ).<br />

• Line numbers can be up to 2 31 (rather than 2 15 ).<br />

The 64-bit XCOFF does not differ from the 32-bit XCOFF format in the following<br />

fields because they are considered to be big enough:<br />

• Symbol table indexes will still be limited to 2 31 , allowing about half this many<br />

symbols in an executable (each symbol uses an average of about two symbol<br />

table entries).<br />

• The string table will be limited to 2 31 bytes in size, limiting the sum of the<br />

length of all symbol names to less than this value.<br />

The following design issues have been implemented:<br />

• All header file declarations for both 32-bit XCOFF and 64-bit XCOFF are<br />

contained in the same files used for 32-bit XCOFF declarations.<br />

• Field names within structures are the same for structures that have different<br />

versions for 32-bit XCOFF and 64-bit XCOFF.<br />

• Where possible, the structure sizes and layouts from the 32-bit XCOFF<br />

definition were not changed. Some fields have been rearranged to avoid<br />

alignment padding and to increase the number of fields that are at the same<br />

offset in both XCOFF versions.<br />

46 <strong>AIX</strong> <strong>Version</strong> <strong>4.3</strong> <strong>Differences</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!