diff options
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/ReferenceKinds.h')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/ReferenceKinds.h | 60 |
1 files changed, 38 insertions, 22 deletions
diff --git a/lld/lib/ReaderWriter/MachO/ReferenceKinds.h b/lld/lib/ReaderWriter/MachO/ReferenceKinds.h index ea889747f10..063b273c91f 100644 --- a/lld/lib/ReaderWriter/MachO/ReferenceKinds.h +++ b/lld/lib/ReaderWriter/MachO/ReferenceKinds.h @@ -48,16 +48,23 @@ protected: class KindHandler_x86_64 : public KindHandler { public: enum Kinds { - none = 0, - call32 = 1, - ripRel32 = 2, - gotLoad32 = 3, - gotUse32 = 4, - lea32WasGot = 5, - lazyTarget = 6, - lazyImm = 7, - gotTarget = 8, - pointer64 = 9 + none, + branch32, // CALL or JMP 32-bit pc-rel + ripRel32, // RIP-rel access pc-rel to fix up location + ripRel32_1, // RIP-rel access pc-rel to fix up location + 1 + ripRel32_2, // RIP-rel access pc-rel to fix up location + 2 + ripRel32_4, // RIP-rel access pc-rel to fix up location + 4 + gotLoadRipRel32, // RIP-rel load of GOT slot (can be optimized) + gotLoadRipRel32NowLea, // RIP-rel movq load of GOT slot optimized to LEA + gotUseRipRel32, // RIP-rel non-load of GOT slot (not a movq load of GOT) + tlvLoadRipRel32, // RIP-rel load of thread local pointer (can be optimized) + tlvLoadRipRel32NowLea, // RIP-rel movq load of TLV pointer optimized to LEA + pointer64, // 64-bit data pointer + pointerRel32, // 32-bit pc-rel offset + lazyTarget, // Used in lazy pointers to reference ultimate target + lazyImmediate, // Location in stub where lazy info offset to be stored + subordinateFDE, // Reference to unwind info for this function + subordinateLSDA // Reference to excecption info for this function }; virtual ~KindHandler_x86_64(); @@ -76,12 +83,15 @@ public: class KindHandler_x86 : public KindHandler { public: enum Kinds { - none = 0, - call32 = 1, - abs32 = 2, - pointer32 = 3, - lazyTarget = 4, - lazyImm = 5 + none, + branch32, // CALL or JMP 32-bit pc-rel + abs32, // 32-bit absolute address embedded in instruction + funcRel32, // 32-bit offset to target from start of function + pointer32, // 32-bit data pointer + lazyTarget, // Used in lazy pointers to reference ultimate target + lazyImmediate, // Location in stub where lazy info offset to be stored + subordinateFDE, // Reference to unwind info for this function + subordinateLSDA // Reference to excecption info for this function }; virtual ~KindHandler_x86(); @@ -99,12 +109,18 @@ public: class KindHandler_arm : public KindHandler { public: enum Kinds { - none = 0, - br22 = 1, - pointer32 = 2, - lazyTarget = 3, - lazyImm = 4 - // FIXME + none, + thumbBranch22, // thumb b or bl with 22/24-bits of displacement + armBranch24, // arm b or bl with 24-bits of displacement + thumbAbsLow16, // thumb movw of absolute address + thumbAbsHigh16, // thumb movt of absolute address + thumbPcRelLow16, // thumb movw of (target - pc) + thumbPcRelHigh16,// thumb movt of (target - pc) + abs32, // 32-bit absolute address embedded in instructions + pointer32, // 32-bit data pointer + lazyTarget, // Used in lazy pointers to reference ultimate target + lazyImmediate, // Location in stub where lazy info offset to be stored + subordinateLSDA // Reference to excecption info for this function }; virtual ~KindHandler_arm(); |