diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:06:04 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:06:04 +0000 |
commit | b289257c7f3ed78b7d3971c596d7c60a9050c705 (patch) | |
tree | d6b57e29a5a86347a020d6f0cae76cc2d0f3bf8d /lib/ReaderWriter/MachO/ArchHandler_arm64.cpp | |
parent | fba2c04f31e119eacf142fcbbaabd5a9e63a39ed (diff) |
Notes
Diffstat (limited to 'lib/ReaderWriter/MachO/ArchHandler_arm64.cpp')
-rw-r--r-- | lib/ReaderWriter/MachO/ArchHandler_arm64.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp b/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp index 0ba590cc64223..778f6f4add74b 100644 --- a/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp +++ b/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp @@ -687,17 +687,28 @@ void ArchHandler_arm64::applyFixupRelocatable(const Reference &ref, case delta64: *loc64 = ref.addend() + inAtomAddress - fixupAddress; return; + case unwindFDEToFunction: + // We don't emit unwindFDEToFunction in -r mode as they are implicitly + // generated from the data in the __eh_frame section. So here we need + // to use the targetAddress so that we can generate the full relocation + // when we parse again later. + *loc64 = targetAddress - fixupAddress; + return; case delta32: *loc32 = ref.addend() + inAtomAddress - fixupAddress; return; case negDelta32: + // We don't emit negDelta32 in -r mode as they are implicitly + // generated from the data in the __eh_frame section. So here we need + // to use the targetAddress so that we can generate the full relocation + // when we parse again later. *loc32 = fixupAddress - targetAddress + ref.addend(); return; case pointer64ToGOT: *loc64 = 0; return; case delta32ToGOT: - *loc32 = -fixupAddress; + *loc32 = inAtomAddress - fixupAddress; return; case addOffset12: llvm_unreachable("lazy reference kind implies GOT pass was run"); @@ -709,9 +720,6 @@ void ArchHandler_arm64::applyFixupRelocatable(const Reference &ref, case unwindInfoToEhFrame: llvm_unreachable("fixup implies __unwind_info"); return; - case unwindFDEToFunction: - // Do nothing for now - return; case invalid: // Fall into llvm_unreachable(). break; |