1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

[RuntimeDyld] Update reserveAllocationSpace to account for stub padding.

This should fix the buildbot failures caused by r362139.

llvm-svn: 362151
This commit is contained in:
Lang Hames 2019-05-30 20:58:28 +00:00
parent 9bc26a3727
commit 2501b5002b

View File

@ -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