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.

On <strong>AIX</strong> <strong>4.3</strong>, the same algorithm is used for loading 64-bit modules, but the work is<br />

split between kernel code and user-space code. The kernel part of the 64-bit<br />

loader is responsible for mapping the modules of a process into the 64-bit user<br />

address space. The user-space part processes the symbol tables and performs<br />

the relocation of the data sections.<br />

Kernel extensions are still in XCOFF32 modules and they are entirely loaded and<br />

resolved by the kernel. The user-space processing of the shared library<br />

segments is handled by a privileged process running in 64-bit mode called the<br />

shared library loader assistant process or SHLAP.<br />

The user-space processing of privately-loaded modules is handled by code that<br />

is loaded into a system-wide segment that is shared by all 64-bit processes. This<br />

code is called user-space loader assistant (USLA) and runs in the process of<br />

loading the module. The USLA is implemented as a loadable module that is<br />

prelinked at a fixed address, so that it will not have to be relocated. When an<br />

execve() system call leaves the kernel, it transfers control to the USLA that<br />

performs symbol resolution and relocation for privately-loaded modules. After<br />

load() calls, library code will be responsible for calling the USLA to complete the<br />

relocation of any newly-loaded modules.<br />

Because the kernel is not performing symbol resolution and relocation for 64-bit<br />

processes, only a small portion of a 64-bit module needs to be addressable in the<br />

kernel. The kernel only needs to examine the XCOFF header, the section<br />

headers, the loader section headers, and the loader section import IDs. Even for<br />

extremely large programs, the size of these areas will be small. Only the import<br />

ID section is variable length, and its length depends on the number of<br />

dependents a module has, not on the size of the module itself. These portions of<br />

a module can be read into allocated memory, avoiding addressability problems<br />

inherent in the existing 32-bit loader.<br />

3.2.6 Virtual Memory Manager<br />

The <strong>AIX</strong> <strong>4.3</strong> design point is a 60-bit user address space. The areas impacted in<br />

the VMM are the address space code, the shared memory code, teaching VMM<br />

code to understand remapped addresses, and the remapping services<br />

themselves.<br />

3.2.6.1 Executing a 64-Bit Program<br />

The size of a user-address space only changes as a result of exec(). A 32-bit<br />

program may exec a 32 or 64-bit program, and conversely, all combinations are<br />

possible.<br />

The VMM provides support routines for exec() processing to switch between a<br />

32-bit and 64-bit executable. The routine vm_makeme64() is called when the<br />

exec()’d program is a 64-bit program. This routine pins and initializes the 64-bit<br />

u-block extension, initializes the 64-bit address space structures, initializes the<br />

Address Space Register (ASR) in the Machine State (MST) extension with the<br />

real address of the segment table, sets the sbreak and stack sizes, and marks the<br />

process as a 64-bit executable.<br />

The routine vm_makeme32() is called whenever a 64-bit program execs(). It is<br />

called even if the program to be executed is 64-bits. This routine initializes a<br />

32-bit user address space from the 64-bit one, clears the 64-bit MST extension<br />

52 <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!