|
LLVM 22.0.0git
|
Classes | |
| class | GOTTableManager |
| Global Offset Table Builder. More... | |
| class | PLTTableManager |
| Procedure Linkage Table Builder. More... | |
Enumerations | |
| enum | EdgeKind_systemz : Edge::Kind { Pointer64 = Edge::FirstRelocation , Pointer32 , Pointer20 , Pointer16 , Pointer12 , Pointer8 , Delta64 , Delta32 , Delta16 , Delta32dbl , Delta24dbl , Delta16dbl , Delta12dbl , NegDelta64 , NegDelta32 , DeltaPLT32dbl , DeltaPLT24dbl , DeltaPLT16dbl , DeltaPLT12dbl , DeltaPLT64 , DeltaPLT32 , Delta64PLTFromGOT , Delta32PLTFromGOT , Delta16PLTFromGOT , Delta64FromGOT , Delta32FromGOT , Delta16FromGOT , Delta20FromGOT , Delta12FromGOT , RequestGOTAndTransformToDelta64FromGOT , RequestGOTAndTransformToDelta32FromGOT , RequestGOTAndTransformToDelta20FromGOT , RequestGOTAndTransformToDelta16FromGOT , RequestGOTAndTransformToDelta12FromGOT , RequestGOTAndTransformToDelta32dbl , Delta32GOTBase , Delta32dblGOTBase } |
| Represents systemz fixups and other systemz-specific edge kinds. More... | |
Functions | |
| const char * | getEdgeKindName (Edge::Kind K) |
| Returns a string name for the given systemz edge. | |
| Error | applyFixup (LinkGraph &G, Block &B, const Edge &E, const Symbol *GOTSymbol) |
| Apply fixup expression for edge to block content. | |
| ArrayRef< char > | getGOTEntryBlockContent (LinkGraph &G) |
| ArrayRef< char > | getStubBlockContent (LinkGraph &G) |
| Symbol & | createAnonymousPointer (LinkGraph &G, Section &PointerSection, Symbol *InitialTarget=nullptr, uint64_t InitialAddend=0) |
| Creates a new pointer block in the given section and returns an Anonymous symbol pointing to it. | |
| Block & | createPointerJumpStubBlock (LinkGraph &G, Section &StubSection, Symbol &PointerSymbol) |
| Create a jump stub block that jumps via the pointer at the given symbol. | |
| Symbol & | createAnonymousPointerJumpStub (LinkGraph &G, Section &StubSection, Symbol &PointerSymbol) |
| Create a jump stub that jumps via the pointer at the given symbol and an anonymous symbol pointing to it. | |
Variables | |
| const char | NullPointerContent [8] |
| SystemZ null pointer content. | |
| constexpr size_t | StubEntrySize = 8 |
| SystemZ pointer jump stub content. | |
| const char | Pointer64JumpStubContent [StubEntrySize] |
| enum llvm::jitlink::systemz::EdgeKind_systemz : Edge::Kind |
Represents systemz fixups and other systemz-specific edge kinds.
| Enumerator | |
|---|---|
| Pointer64 | A plain 64-bit pointer value relocation. Fixup expression: Fixup <- Target + Addend : uint64 |
| Pointer32 | A plain 32-bit pointer value relocation. Fixup expression: Fixup <- Target + Addend : uint32 Errors:
|
| Pointer20 | A plain 20-bit pointer value relocation. Fixup expression: Fixup <- Target + Addend : uint20 Errors:
|
| Pointer16 | A plain 16-bit pointer value relocation. Fixup expression: Fixup <- Target + Addend : uint16 Errors:
|
| Pointer12 | A plain 12-bit pointer value relocation. Fixup expression: Fixup <- Target + Addend : uint12 Errors:
|
| Pointer8 | A plain 8-bit pointer value relocation. Fixup expression: Fixup <- Target + Addend : uint8 Errors:
|
| Delta64 | A 64-bit delta. Delta from the fixup to the target. Fixup expression: Fixup <- Target - Fixup + Addend : int64 |
| Delta32 | A 32-bit delta. Delta from the fixup to the target. Fixup expression: Fixup <- Target - Fixup + Addend : int32 Errors:
|
| Delta16 | A 16-bit delta. Delta from the fixup to the target. Fixup expression: Fixup <- Target - Fixup + Addend : int16 Errors:
|
| Delta32dbl | A 32-bit delta shifted by 1. Delta from the fixup to the target. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int32 Errors:
|
| Delta24dbl | A 24-bit delta shifted by 1. Delta from the fixup to the target. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int24 Errors:
|
| Delta16dbl | A 16-bit delta shifted by 1. Delta from the fixup to the target. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int16 Errors:
|
| Delta12dbl | A 12-bit delta shifted by 1. Delta from the fixup to the target. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int12 Errors:
|
| NegDelta64 | A 64-bit negative delta. Delta from target back to the fixup. Fixup expression: Fixup <- Fixup - Target + Addend : int64 |
| NegDelta32 | A 32-bit negative delta. Delta from the target back to the fixup. Fixup expression: Fixup <- Fixup - Target + Addend : int32 Errors:
|
| DeltaPLT32dbl | A 32-bit Delta shifted by 1. Delta from the fixup to the PLT slot for the target. This will lead to creation of a PLT stub. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int32 Errors:
|
| DeltaPLT24dbl | A 24-bit Delta shifted by 1. Delta from the fixup to the PLT slot for the target. This will lead to creation of a PLT stub. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int24 Errors:
|
| DeltaPLT16dbl | A 16-bit Delta shifted by 1. Delta from the fixup to the PLT slot for the target. This will lead to creation of a PLT stub. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int16 Errors:
|
| DeltaPLT12dbl | A 12-bit Delta shifted by 1. Delta from the fixup to the PLT slot for the target. This will lead to creation of a PLT stub. Fixup expression: Fixup <- (Target - Fixup + Addend) >> 1 : int12 Errors:
|
| DeltaPLT64 | A 64-bit Delta. Delta from the fixup to the PLT slot for the target. This will lead to creation of a PLT stub. Fixup expression: Fixup <- Target - Fixup + Addend : int64 |
| DeltaPLT32 | A 32-bit Delta. Delta from the fixup to the PLT slot for the target. This will lead to creation of a PLT stub. Fixup expression: Fixup <- Target - Fixup + Addend : int32 Errors:
|
| Delta64PLTFromGOT | A 64-bit offset from GOT to PLT. Fixup expression: Fixup <- Target - GOTBase + Addend : int64 Errors:
|
| Delta32PLTFromGOT | A 32-bit offset from GOT to PLT. Fixup expression: Fixup <- Target - GOTBase + Addend : int32 Errors:
|
| Delta16PLTFromGOT | A 16-bit offset from GOT to PLT. Fixup expression: Fixup <- Target - GOTBase + Addend : int16 Errors:
|
| Delta64FromGOT | A 64-bit offset from GOT. Fixup expression: Fixup <- Target - GOTBase + Addend : int64 Errors:
|
| Delta32FromGOT | A 32-bit offset from GOT. Fixup expression: Fixup <- Target - GOTBase + Addend : int32 Errors:
|
| Delta16FromGOT | A 16-bit offset from GOT. Fixup expression: Fixup <- Target - GOTBase + Addend : int16 Errors:
|
| Delta20FromGOT | A 20-bit offset from GOT. Fixup expression: Fixup <- Target - GOTBase + Addend : int20 Errors:
|
| Delta12FromGOT | A 12-bit offset from GOT. Fixup expression: Fixup <- Target - GOTBase + Addend : int12 Errors:
|
| RequestGOTAndTransformToDelta64FromGOT | A GOT entry getter/constructor, transformed to Delta64FromGOT pointing at the GOT entry for the original target. Indicates that this edge should be transformed into a Delta64FromGOT targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist. Edges of this kind are usually handled by a GOT builder pass inserted by default. Fixup expression: NONE Errors:
|
| RequestGOTAndTransformToDelta32FromGOT | A GOT entry getter/constructor, transformed to Delta32FromGOT pointing at the GOT entry for the original target. Indicates that this edge should be transformed into a Delta32FromGOT targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist. Edges of this kind are usually handled by a GOT builder pass inserted by default. Fixup expression: NONE Errors:
|
| RequestGOTAndTransformToDelta20FromGOT | A GOT entry getter/constructor, transformed to Delta20FromGOT pointing at the GOT entry for the original target. Indicates that this edge should be transformed into a Delta20FromGOT targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist. Edges of this kind are usually handled by a GOT builder pass inserted by default. Fixup expression: NONE Errors:
|
| RequestGOTAndTransformToDelta16FromGOT | A GOT entry getter/constructor, transformed to Delta16FromGOT pointing at the GOT entry for the original target. Indicates that this edge should be transformed into a Delta16FromGOT targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist. Edges of this kind are usually handled by a GOT builder pass inserted by default. Fixup expression: NONE Errors:
|
| RequestGOTAndTransformToDelta12FromGOT | A GOT entry getter/constructor, transformed to Delta12FromGOT pointing at the GOT entry for the original target. Indicates that this edge should be transformed into a Delta12FromGOT targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist. Edges of this kind are usually handled by a GOT builder pass inserted by default. Fixup expression: NONE Errors:
|
| RequestGOTAndTransformToDelta32dbl | A GOT entry getter/constructor, transformed to Delta32dbl pointing at the GOT entry for the original target. Indicates that this edge should be transformed into a Delta32dbl targeting the GOT entry for the edge's current target, maintaining the same addend. A GOT entry for the target should be created if one does not already exist. Edges of this kind are usually handled by a GOT builder pass inserted by default. Fixup expression: NONE Errors:
|
| Delta32GOTBase | A 32-bit Delta to GOT base. Fixup expression: Fixup <- GOTBase - Fixup + Addend : int32 Errors:
|
| Delta32dblGOTBase | A 32-bit Delta to GOT base shifted by 1. Fixup expression: Fixup <- (GOTBase - Fixup + Addend) >> 1 : int32 Errors:
|
|
inline |
Apply fixup expression for edge to block content.
Definition at line 545 of file systemz.h.
References A(), assert(), B(), llvm::dbgs(), DEBUG_WITH_TYPE, Delta12dbl, Delta12FromGOT, Delta16, Delta16dbl, Delta16FromGOT, Delta16PLTFromGOT, Delta20FromGOT, Delta24dbl, Delta32, Delta32dbl, Delta32dblGOTBase, Delta32FromGOT, Delta32GOTBase, Delta32PLTFromGOT, Delta64, Delta64FromGOT, Delta64PLTFromGOT, DeltaPLT12dbl, DeltaPLT16dbl, DeltaPLT24dbl, DeltaPLT32, DeltaPLT32dbl, DeltaPLT64, llvm::formatv(), G, llvm::jitlink::Symbol::getAddress(), getEdgeKindName(), llvm::orc::ExecutorAddr::getValue(), llvm::jitlink::isAlignmentCorrect(), llvm::isInt(), llvm::isUInt(), LLVM_UNLIKELY, llvm::make_error(), llvm::jitlink::makeAlignmentError(), llvm::jitlink::makeTargetOutOfRangeError(), N, NegDelta32, P, Pointer12, Pointer16, Pointer20, Pointer32, Pointer64, Pointer8, llvm::support::endian::read16be(), llvm::support::endian::read32be(), llvm::Error::success(), llvm::support::endian::write16be(), llvm::support::endian::write32be(), and llvm::support::endian::write64be().
|
inline |
Creates a new pointer block in the given section and returns an Anonymous symbol pointing to it.
If InitialTarget is given then an Pointer64 relocation will be added to the block pointing at InitialTarget.
Definition at line 776 of file systemz.h.
References B(), G, getGOTEntryBlockContent(), and Pointer64.
Referenced by llvm::jitlink::systemz::GOTTableManager::createEntry(), and llvm::jitlink::getAnonymousPointerCreator().
|
inline |
Create a jump stub that jumps via the pointer at the given symbol and an anonymous symbol pointing to it.
Return the anonymous symbol.
The stub block will be created by createPointerJumpStubBlock.
Definition at line 803 of file systemz.h.
References createPointerJumpStubBlock(), G, and StubEntrySize.
Referenced by llvm::jitlink::systemz::PLTTableManager::createEntry(), and llvm::jitlink::getPointerJumpStubCreator().
|
inline |
Create a jump stub block that jumps via the pointer at the given symbol.
The stub block will have the following default values: alignment: 16-bit alignment-offset: 0
Definition at line 791 of file systemz.h.
References B(), Delta32dbl, G, and getStubBlockContent().
Referenced by createAnonymousPointerJumpStub().
Returns a string name for the given systemz edge.
For debugging purposes only
Definition at line 35 of file systemz.cpp.
References Delta12dbl, Delta16, Delta16dbl, Delta16FromGOT, Delta16PLTFromGOT, Delta24dbl, Delta32, Delta32dbl, Delta32dblGOTBase, Delta32FromGOT, Delta32GOTBase, Delta32PLTFromGOT, Delta64, Delta64FromGOT, Delta64PLTFromGOT, DeltaPLT12dbl, DeltaPLT16dbl, DeltaPLT24dbl, DeltaPLT32, DeltaPLT32dbl, DeltaPLT64, llvm::jitlink::getGenericEdgeKindName(), NegDelta32, NegDelta64, Pointer12, Pointer16, Pointer20, Pointer32, Pointer64, Pointer8, RequestGOTAndTransformToDelta12FromGOT, RequestGOTAndTransformToDelta16FromGOT, RequestGOTAndTransformToDelta20FromGOT, RequestGOTAndTransformToDelta32dbl, RequestGOTAndTransformToDelta32FromGOT, and RequestGOTAndTransformToDelta64FromGOT.
Referenced by applyFixup().
Definition at line 753 of file systemz.h.
References G, and NullPointerContent.
Referenced by createAnonymousPointer().
Definition at line 766 of file systemz.h.
References G, Pointer64JumpStubContent, and StubEntrySize.
Referenced by createPointerJumpStubBlock().
SystemZ null pointer content.
Definition at line 21 of file systemz.cpp.
Referenced by getGOTEntryBlockContent().
Definition at line 24 of file systemz.cpp.
Referenced by getStubBlockContent().
|
constexpr |
SystemZ pointer jump stub content.
Contains the instruction sequence for an indirect jump via an in-memory pointer: lgrl r1, ptr j r1
Definition at line 764 of file systemz.h.
Referenced by createAnonymousPointerJumpStub(), and getStubBlockContent().