mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
[RuntimeDyld] Propagate Errors from findPPC64TOCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267789 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9390186529
commit
5089efd04e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user