3 relative, Relative – Avago Technologies LSI53C1010 User Manual
Page 145

NASM Output File Examples
5-7
0x00000011L
};
Using -p assembler option:
ULONG E_ex_buf1_Used[] = {
0x0000000FL,
0x00000011L
};
5.2.3 Relative
The Relative section contains the relative buffer records, if any were
declared. The first part is the Relative Header Record, which contains:
#define Rel_Count count
Where
count
is a total count of all the uses of all the Relative buffers in
the SCRIPTS program. For example, in the SCRIPTS example above,
rel_buf1 and rel_buf2 are each used once so
Rel_Count
is #defined to
2, indicating that there were two uses of Relative buffers in the SCRIPTS
code.
The second part of the Relative record is the Relative Patch Array which
contains:
ULONG Rel_Patches[Rel_Count] = {
Rel_Offset1,
Rel_Offset2,
Rel_Offset3,
.
.
Rel_Offsetn
};
Where
Rel_Offsetn
is an offset into the SCRIPTS array where a
Relative buffer is used. This array, along with the Relative Header
Record, can be used to patch all Relative buffers in a SCRIPTS program.
Please see the
subsection entitled “Patching,”
on
for more
information.
The third part of the Relative record is the Relative Buffer Record, which
contains:
#define R_name offset