diff options
| author | Nick Kledzik <kledzik@apple.com> | 2014-11-11 01:31:18 +0000 |
|---|---|---|
| committer | Nick Kledzik <kledzik@apple.com> | 2014-11-11 01:31:18 +0000 |
| commit | f373c77f50451ff585b507cce05705632553d13a (patch) | |
| tree | fb6cedffaeed828aae6c4b445d7c849823f78d7e /lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp | |
| parent | a041610f11e9be018e125a5789e3ea258659dab4 (diff) | |
| download | bcm5719-llvm-f373c77f50451ff585b507cce05705632553d13a.tar.gz bcm5719-llvm-f373c77f50451ff585b507cce05705632553d13a.zip | |
[mach-o] Fix lazy binding offsets
The way lazy binding works in mach-o is that the linker generates a helper
function and has the stub (PLT) initially jump to it. The helper function
pushes an extra parameter then jumps into dyld. The extra parameter is an
offset into the lazy binding info where dyld will find the information about
which symbol to bind and way lazy binding pointer to update.
llvm-svn: 221654
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp')
| -rw-r--r-- | lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp b/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp index e30dd4dede0..65a40802c54 100644 --- a/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp +++ b/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp @@ -998,9 +998,11 @@ void ArchHandler_arm::applyFixupFinal(const Reference &ref, uint8_t *loc, *loc32 = targetAddress - fixupAddress + ref.addend(); break; case lazyPointer: - case lazyImmediateLocation: // do nothing break; + case lazyImmediateLocation: + *loc32 = ref.addend(); + break; case invalid: llvm_unreachable("invalid ARM Reference Kind"); break; |

