diff options
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/StubsPass.cpp')
| -rw-r--r-- | lld/lib/ReaderWriter/MachO/StubsPass.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lld/lib/ReaderWriter/MachO/StubsPass.cpp b/lld/lib/ReaderWriter/MachO/StubsPass.cpp index 88eaf3023bf..2e78d5e6d75 100644 --- a/lld/lib/ReaderWriter/MachO/StubsPass.cpp +++ b/lld/lib/ReaderWriter/MachO/StubsPass.cpp @@ -68,11 +68,11 @@ private: // class NonLazyPointerAtom : public SimpleDefinedAtom { public: - NonLazyPointerAtom(const File &file, bool is64) - : SimpleDefinedAtom(file), _is64(is64) { } + NonLazyPointerAtom(const File &file, bool is64, ContentType contentType) + : SimpleDefinedAtom(file), _is64(is64), _contentType(contentType) { } ContentType contentType() const override { - return DefinedAtom::typeGOT; + return _contentType; } Alignment alignment() const override { @@ -95,6 +95,7 @@ public: private: const bool _is64; + const ContentType _contentType; }; // @@ -239,9 +240,11 @@ public: SimpleDefinedAtom *helperCommonAtom = new (_file.allocator()) StubHelperCommonAtom(_file, _stubInfo); SimpleDefinedAtom *helperCacheNLPAtom = - new (_file.allocator()) NonLazyPointerAtom(_file, _ctx.is64Bit()); + new (_file.allocator()) NonLazyPointerAtom(_file, _ctx.is64Bit(), + _stubInfo.stubHelperImageCacheContentType); SimpleDefinedAtom *helperBinderNLPAtom = - new (_file.allocator()) NonLazyPointerAtom(_file, _ctx.is64Bit()); + new (_file.allocator()) NonLazyPointerAtom(_file, _ctx.is64Bit(), + _stubInfo.stubHelperImageCacheContentType); addReference(helperCommonAtom, _stubInfo.stubHelperCommonReferenceToCache, helperCacheNLPAtom); addOptReference( |

