aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2012-10-29 10:47:04 +0000
committerTim Northover <Tim.Northover@arm.com>2012-10-29 10:47:04 +0000
commitf00677d74f1be5b4c7c73e1681a64c9062f4c7ee (patch)
tree055c21d0903a30c5697b6969427135c3f5a5bbd8 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
parenta41dce3c642e50775352cce49e3a3d0cd004d393 (diff)
downloadexternal_llvm-f00677d74f1be5b4c7c73e1681a64c9062f4c7ee.zip
external_llvm-f00677d74f1be5b4c7c73e1681a64c9062f4c7ee.tar.gz
external_llvm-f00677d74f1be5b4c7c73e1681a64c9062f4c7ee.tar.bz2
Make use of common-symbol alignment info in ELF loader.
Patch by Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 1073c6f..b9c5f8b 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/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;