summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
index 30ce7739732..c29bcdd7387 100644
--- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -195,6 +195,9 @@ void MachOLinkingContext::configure(HeaderFileType type, Arch arch, OS os,
_pageZeroSize = 0x1000;
}
+ // Initial base address is __PAGEZERO size.
+ _baseAddress = _pageZeroSize;
+
// Make PIE by default when targetting newer OSs.
switch (os) {
case OS::macOSX:
OpenPOWER on IntegriCloud