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
This commit is contained in:
Tim Northover
2012-10-29 10:47:04 +00:00
parent a41dce3c64
commit f00677d74f
5 changed files with 79 additions and 18 deletions

View File

@@ -18,8 +18,18 @@
using namespace llvm;
namespace llvm {
namespace {
// Helper for extensive error checking in debug builds.
error_code Check(error_code Err) {
if (Err) {
report_fatal_error(Err.message());
}
return Err;
}
} // end anonymous namespace
class RuntimeDyldELF : public RuntimeDyldImpl {
protected:
void resolveX86_64Relocation(uint8_t *LocalAddress,
@@ -64,6 +74,8 @@ protected:
const SymbolTableMap &Symbols,
StubMap &Stubs);
unsigned getCommonSymbolAlignment(const SymbolRef &Sym);
virtual ObjectImage *createObjectImage(ObjectBuffer *InputBuffer);
uint64_t findPPC64TOC() const;