Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction) which requires assemble‐ or run‐ time patching.
Synopsis
Declared in <llvm/MC/MCFixup.h>
class MCFixup;
Description
Fixups are used any time the target instruction encoder needs to represent some value in an instruction which is not yet concrete. The encoder will encode the instruction assuming the value is 0, and emit a fixup which communicates to the assembler backend how it should rewrite the encoded value.
During the process of relaxation, the assembler will apply fixups as symbolic values become concrete. When relaxation is complete, any remaining fixups become relocations in the object file (or errors, if the fixup cannot be encoded on the target).
Member Functions
Name |
Description |
Return the target‐dependent kind of this fixup. |
|
Return the source location associated with this fixup. |
|
Return the byte offset of this fixup within its fragment. |
|
Return the expression whose value should be written at the fixup. |
|
Return true if this fixup is linker‐relaxable. |
|
Return true if this is a PC‐relative fixup. |
|
Mark this fixup as linker‐relaxable. |
|
Set the byte offset of this fixup within its fragment. |
|
Mark this fixup as PC‐relative. |
Static Member Functions
Name |
Description |
Create a fixup at |
|
Return the generic fixup kind for a value with the given size. It is an error to pass an unsupported size. |
Created with MrDocs