forked from OSchip/llvm-project
Check section type rather than assuming it's code when emitting sections while processing relocations.
llvm-svn: 165854
This commit is contained in:
parent
7e48b252e7
commit
4732872bd2
|
@ -413,7 +413,13 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,
|
|||
if (si == Obj.end_sections())
|
||||
llvm_unreachable("Symbol section not found, bad object file format!");
|
||||
DEBUG(dbgs() << "\t\tThis is section symbol\n");
|
||||
Value.SectionID = findOrEmitSection(Obj, (*si), true, ObjSectionToID);
|
||||
// Default to 'true' in case isText fails (though it never does).
|
||||
bool isCode = true;
|
||||
si->isText(isCode);
|
||||
Value.SectionID = findOrEmitSection(Obj,
|
||||
(*si),
|
||||
isCode,
|
||||
ObjSectionToID);
|
||||
Value.Addend = Addend;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue