diff options
author | Tim Northover <Tim.Northover@arm.com> | 2012-10-29 10:47:04 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2012-10-29 10:47:04 +0000 |
commit | 94bc73d3d1eb584bf5a8e715aac21a6cb1811500 (patch) | |
tree | d4af2d72bdc740d19fef73d65d339004a51a281f /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | |
parent | 4f223bf7c484c1cf84b43ecd39b4f5a0f2f41053 (diff) | |
download | bcm5719-llvm-94bc73d3d1eb584bf5a8e715aac21a6cb1811500.tar.gz bcm5719-llvm-94bc73d3d1eb584bf5a8e715aac21a6cb1811500.zip |
Make use of common-symbol alignment info in ELF loader.
Patch by Amara Emerson.
llvm-svn: 166919
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 1073c6fc522..b9c5f8b8647 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -796,6 +796,13 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel, } } +unsigned RuntimeDyldELF::getCommonSymbolAlignment(const SymbolRef &Sym) { + // In ELF, the value of an SHN_COMMON symbol is its alignment requirement. + uint64_t Align; + Check(Sym.getValue(Align)); + return Align; +} + bool RuntimeDyldELF::isCompatibleFormat(const ObjectBuffer *Buffer) const { if (Buffer->getBufferSize() < strlen(ELF::ElfMagic)) return false; |