Change how symbol sizes are handled in lib/Object.
[oota-llvm.git] / lib / Target / X86 / MCTargetDesc / X86ELFRelocationInfo.cpp
index 2efee5a18d37633329641a4de59fd8a43fb49e51..a84c4c584949325de09bf446cb1b2f51a99fd6a5 100644 (file)
@@ -31,8 +31,9 @@ public:
 
     StringRef SymName; SymI->getName(SymName);
     uint64_t  SymAddr; SymI->getAddress(SymAddr);
-    uint64_t  SymSize; SymI->getSize(SymSize);
-    int64_t  Addend;  getELFRelocationAddend(Rel, Addend);
+    auto *Obj = cast<ELFObjectFileBase>(Rel.getObjectFile());
+    uint64_t SymSize = Obj->getSymbolSize(*SymI);
+    int64_t Addend = *Obj->getRelocationAddend(Rel.getRawDataRefImpl());
 
     MCSymbol *Sym = Ctx.getOrCreateSymbol(SymName);
     // FIXME: check that the value is actually the same.