Skip to content

Commit

Permalink
[RuntimeDyld] Fix a bug in RuntimeDyld::loadObjectImpl that was over-…
Browse files Browse the repository at this point in the history
…allocating

space for common symbols.

Patch by Dmitry Sidorov. Thanks Dmitry!

Differential revision: https://reviews.llvm.org/D50240

llvm-svn: 340125
  • Loading branch information
lhames committed Aug 18, 2018
1 parent 9c1761a commit 8e29622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
Expand Up @@ -277,7 +277,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
Expand Down

0 comments on commit 8e29622

Please sign in to comment.