Data Structures | |
struct | reloc_s |
Relocation record. More... | |
Typedefs | |
typedef struct reloc_s | reloc_t |
Relocation record. More... | |
Enumerations | |
enum | reloc_type { rel_none, rel_op_a_def, rel_op_b_def, rel_op_c_def, rel_op_a_op, rel_op_b_op, rel_op_c_op, rel_def_op, rel_def_def, rel_def_func, rel_def_string, rel_def_field, rel_op_a_def_ofs, rel_op_b_def_ofs, rel_op_c_def_ofs, rel_def_def_ofs, rel_def_field_ofs } |
Relocation record types. More... | |
Functions | |
reloc_t * | new_reloc (struct defspace_s *space, int offset, reloc_type type) |
Create a relocation record of the specified type. More... | |
void | reloc_attach_relocs (reloc_t *relocs, reloc_t **location) |
void | reloc_def_def (struct def_s *def, struct def_s *location) |
Create a relocation record for a data location referencing a def. More... | |
void | reloc_def_def_ofs (struct def_s *def, struct def_s *location) |
Create a relocation record for a data location referencing a def. More... | |
void | reloc_def_field (struct def_s *def, struct def_s *location) |
Create a relocation record for a data location referencing a field. More... | |
void | reloc_def_field_ofs (struct def_s *def, struct def_s *location) |
Create a relocation record for a data location referencing a field. More... | |
void | reloc_def_func (struct function_s *func, struct def_s *location) |
Create a relocation record for a data location referencing a function. More... | |
void | reloc_def_op (struct ex_label_s *label, struct def_s *location) |
Create a relocation record for a data location referencing an instruction. More... | |
void | reloc_def_string (struct def_s *location) |
Create a relocation record for a data location referencing a string. More... | |
void | reloc_op_def (struct def_s *def, int offset, int field) |
Create a relocation record for an instruction referencing a def. More... | |
void | reloc_op_def_ofs (struct def_s *def, int offset, int field) |
Create a relative relocation record for an instruction referencing a def. More... | |
void | relocate_refs (reloc_t *refs, int offset) |
Perform all relocations in a relocation chain. More... | |
Relocation record.
One relocation record is created for each reference that needs to be updated.
enum reloc_type |
Relocation record types.
Types marked with * are relative and fixed up before the qfo is written. Types marked with ! are handled by only the linker. Types marked with + use pr.relocs
reloc_t* new_reloc | ( | struct defspace_s * | space, |
int | offset, | ||
reloc_type | type | ||
) |
Create a relocation record of the specified type.
The current source file and line will be preserved in the relocation record.
space | The defspace containting the location to be adjusted. |
offset | The address of the location to be adjusted. |
type | The type of relocation to be performed. |
Create a relocation record for a data location referencing a def.
The relocation record will be linked into the def's chain of relocation records.
When the relocation is performed, the target address will replace the value stored in the data location.
def | The def being referenced. |
location | Def describing the location of the reference to be adjusted. As the def's space and offset will be copied into the relocation record, a dummy def may be used. |
Create a relocation record for a data location referencing a def.
The relocation record will be linked into the def's chain of relocation records.
When the relocation is performed, the target address will be added to the value stored in the data location.
def | The def being referenced. |
location | Def describing the location of the reference to be adjusted. As the def's space and offset will be copied into the relocation record, a dummy def may be used. |
Create a relocation record for a data location referencing a field.
The relocation record will be linked into the def's chain of relocation records.
When the relocation is performed, the target address will replace the value stored in the data location.
def | The def representing the field being referenced. |
location | Def describing the location of the reference to be adjusted. As the def's space and offset will be copied into the relocation record, a dummy def may be used. |
Create a relocation record for a data location referencing a field.
The relocation record will be linked into the def's chain of relocation records.
When the relocation is performed, the target address will be added to the value stored in the data location.
def | The def representing the field being referenced. |
location | Def describing the location of the reference to be adjusted. As the def's space and offset will be copied into the relocation record, a dummy def may be used. |
void reloc_def_func | ( | struct function_s * | func, |
struct def_s * | location | ||
) |
Create a relocation record for a data location referencing a function.
The relocation record will be linked into the function's chain of relocation records.
When the relocation is performed, the function number will replace the value stored in the data location.
func | The function being referenced. |
location | Def describing the location of the reference to be adjusted. As the def's space and offset will be copied into the relocation record, a dummy def may be used. |
void reloc_def_op | ( | struct ex_label_s * | label, |
struct def_s * | location | ||
) |
Create a relocation record for a data location referencing an instruction.
The relocation record will be linked into the global chain of relocation records.
When the relocation is performed, the string index will replace the value stored in the data location.
label | The label representing the instruction being referenced. |
location | Def describing the location of the reference to be adjusted. As the def's space and offset will be copied into the relocation record, a dummy def may be used. |
void reloc_def_string | ( | struct def_s * | location | ) |
Create a relocation record for a data location referencing a string.
The relocation record will be linked into the global chain of relocation records.
When the relocation is performed, the string index will replace the value stored in the data location.
location | Def describing the location of the reference to be adjusted. As the def's space and offset will be copied into the relocation record, a dummy def may be used. |
Create a relocation record for an instruction referencing a def.
The relocation record will be linked into the def's chain of relocation records.
When the relocation is performed, the target address will replace the value stored in the instruction's operand field.
def | The def being referenced. |
offset | The address of the instruction that will be adjusted. |
field | The instruction field to be adjusted: 0 = opa, 1 = opb, 2 = opc. |
Create a relative relocation record for an instruction referencing a def.
The relocation record will be linked into the def's chain of relocation records.
When the relocation is performed, the target address will be added to the value stored in the instruction's operand field.
def | The def being referenced. |
offset | The address of the instruction that will be adjusted. |
field | The instruction field to be adjusted: 0 = opa, 1 = opb, 2 = opc. |