Make use of common-symbol alignment info in ELF loader.
[oota-llvm.git] / lib / ExecutionEngine / RuntimeDyld / RuntimeDyldELF.h
index 6c31f0dc12210b9c17e30c54fc053895a90cc7ef..cbdc0dbc6b734f79ba08a5481f60034451ab1c4d 100644 (file)
 
 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;