diff options
author | Tom Stellard <tstellar@redhat.com> | 2018-12-07 00:24:01 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2018-12-07 00:24:01 +0000 |
commit | 06a6c3307840bdc677efb19ce8a87e1ead4c2c5d (patch) | |
tree | bfd302fe71446d6378603c2c933a1d85d460d119 | |
parent | cc39aee52886ad79b637af4311b1f3fe5e34953e (diff) | |
download | llvm-06a6c3307840bdc677efb19ce8a87e1ead4c2c5d.tar.gz |
Merging r340125:
------------------------------------------------------------------------
r340125 | lhames | 2018-08-18 11:38:37 -0700 (Sat, 18 Aug 2018) | 6 lines
[RuntimeDyld] Fix a bug in RuntimeDyld::loadObjectImpl that was over-allocating
space for common symbols.
Patch by Dmitry Sidorov. Thanks Dmitry!
Differential revision: https://reviews.llvm.org/D50240
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@348555 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 1189be599edd..76f5e5ead504 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -275,7 +275,7 @@ RuntimeDyldImpl::loadObjectImpl(const object::ObjectFile &Obj) { uint64_t Size = I->getCommonSize(); if (!CommonAlign) CommonAlign = Align; - CommonSize += alignTo(CommonSize, Align) + Size; + CommonSize = alignTo(CommonSize, Align) + Size; CommonSymbolsToAllocate.push_back(*I); } } else |