mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 22:55:15 +00:00
Check section type rather than assuming it's code when emitting sections while processing relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165854 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e6c3cc8dc5
commit
fa8cd9d64a
@ -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
Block a user