From 09a74c46ec47d770aaac40930f903839be214989 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Wed, 27 Apr 2016 20:51:58 +0000 Subject: [PATCH] [RuntimeDyld] Propagate Errors from findPPC64TOCSection. llvm-svn: 267789 --- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 1b59ffa..59f15b0 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -1592,7 +1592,8 @@ RuntimeDyldELF::processRelocationRef( } RelocationValueRef TOCValue; - findPPC64TOCSection(Obj, ObjSectionToID, TOCValue); + if (auto Err = findPPC64TOCSection(Obj, ObjSectionToID, TOCValue)) + return std::move(Err); if (Value.SymbolName || Value.SectionID != TOCValue.SectionID) llvm_unreachable("Unsupported TOC relocation."); Value.Addend -= TOCValue.Addend; @@ -1604,9 +1605,11 @@ RuntimeDyldELF::processRelocationRef( // symbols (in which case the addend is respected). if (RelType == ELF::R_PPC64_TOC) { RelType = ELF::R_PPC64_ADDR64; - findPPC64TOCSection(Obj, ObjSectionToID, Value); + if (auto Err = findPPC64TOCSection(Obj, ObjSectionToID, Value)) + return std::move(Err); } else if (TargetName == ".TOC.") { - findPPC64TOCSection(Obj, ObjSectionToID, Value); + if (auto Err = findPPC64TOCSection(Obj, ObjSectionToID, Value)) + return std::move(Err); Value.Addend += Addend; } -- 2.7.4