HP-UX Reference (11i v1 00/12) - 4 File Formats (vol 8)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man4/!!!intro.4
________________________________________________________________
___ ___
a
a.out(4) a.out(4)
Value mode structure arg_type
0 any any any
1 value parm scalar void
2 reference parm array signed byte
3 value-result struct unsigned byte
4 name pointer signed short
5 variable long ptr unsigned short
6 function return C string signed long
7 procedure Pascal string unsigned long
8 long ref parm procedure signed dbl word
9 function unsigned dbl word
10 label short real
11 real
12 long real
13 short complex
14 complex
15 long complex
16 packed decimal
17 struct/array
For procedure entry points, the parameter relocation bits define the locations of the formal parameters and
the return value. Normally, the first four words of the parameter list are passed in general registers
(r26-r23) instead of on the stack, and the return value is returned in r29. Floating-point parameters in
this range are passed instead in oating-point registers (
fr4-fr7) and a floating-point value is returned
in fr4. The parameter relocation bits consist of ve pairs of bits that describe the rst four words of the
parameter list and the return value. The leftmost pair of bits describes the first parameter word, and the
rightmost pair of bits describes the return value. The meanings of these bits are shown in the following
table.
Bits Meaning
00 No parameter or return value
01 Parameter or return value in general register
10 Parameter or return value in floating-point register
11 Double-precision floating-point value
For double-precision oating-point parameters, the odd-numbered parameter word should be marked
11
and the even-numbered parameter word should be marked
10. Double-precision return values are simply
marked
11.
Every procedure call is tagged with a similar set of bits (see "Relocation Information" below), so that the
linker can match each call with the expectations of the procedure entry point. If the call and entry point
mismatch, the linker creates a stub that relocates the parameters and return value as appropriate.
Relocation Information
Each initialized subspace defines a range of fixups that apply to the data in that subspace. A fixup request
is associated with every word that requires relocation or that contains a reference to an unsatisfied symbol.
In relocatable object files created prior to HP-UX Release 3.0 on Series 800 systems, each fixup request is a
five-word structure describing a code or data word to be patched at link time. Object files created on
Release 3.0 or later contain variable-length fixup requests that describe every byte of the subspace. The
version_id field in the file header distinguishes these two formats; the constant
VERSION_ID is found in
older object files, and the constant
NEW_VERSION_ID
is found in newer ones.
In older object les, fixups can compute an expression involving zero, one, or two symbols and a constant,
then extract a field of bits from that result and deposit those bits in any of several different formats
(corresponding to the Precision Architecture instruction set). The fixup_request_index field in the subspace
dictionary entry indexes into the fixup request area defined by the file header and the
fixup_request_quantity field refers to the number of fixup requests used for that subspace. The structure of
a fixup request is contained in
<reloc.h>.
struct fixup_request_record {
unsigned int need_data_ref: 1; /* reserved */
unsigned int arg_reloc: 10; /* parameter relocation bits */
unsigned int expression_type: 5; /* how to compute value */
unsigned int exec_level: 2; /* reserved */
unsigned int fixup_format: 6; /* how to deposit bits */
Section 48 7 HP-UX Release 11i: December 2000
___
___