summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2019-05-30 20:58:28 +0000
committerLang Hames <lhames@gmail.com>2019-05-30 20:58:28 +0000
commita100042b27f6fce3e314bebca13ce23270eb0705 (patch)
tree1c47ff4f680a61819e928106e08578d552e74181 /llvm/lib
parent0fe645c0866bbae0d1735eeba4ff8b26af7bf9d8 (diff)
downloadbcm5719-llvm-a100042b27f6fce3e314bebca13ce23270eb0705.tar.gz
bcm5719-llvm-a100042b27f6fce3e314bebca13ce23270eb0705.zip
[RuntimeDyld] Update reserveAllocationSpace to account for stub padding.
This should fix the buildbot failures caused by r362139. llvm-svn: 362151
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index b1d22b89af0..e0642adbd31 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -540,7 +540,14 @@ Error RuntimeDyldImpl::computeTotalAllocSize(const ObjectFile &Obj,
return errorCodeToError(EC);
uint64_t StubBufSize = computeSectionStubBufSize(Obj, Section);
- uint64_t SectionSize = DataSize + StubBufSize;
+
+ uint64_t PaddingSize = 0;
+ if (Name == ".eh_frame")
+ PaddingSize += 4;
+ if (StubBufSize != 0)
+ PaddingSize += getStubAlignment() - 1;
+
+ uint64_t SectionSize = DataSize + PaddingSize + StubBufSize;
// The .eh_frame section (at least on Linux) needs an extra four bytes
// padded
OpenPOWER on IntegriCloud