diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2012-10-12 23:53:16 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2012-10-12 23:53:16 +0000 |
commit | 4732872bd22615e54d09e6676f82483c46d7b079 (patch) | |
tree | 040d70072ad7c032a8cc4a9ee1990a1bc8a22c8b /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | |
parent | 7e48b252e74a83ba161ffea8d9bdd6a2a0b56c5f (diff) | |
download | bcm5719-llvm-4732872bd22615e54d09e6676f82483c46d7b079.tar.gz bcm5719-llvm-4732872bd22615e54d09e6676f82483c46d7b079.zip |
Check section type rather than assuming it's code when emitting sections while processing relocations.
llvm-svn: 165854
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 414957c356e..08aba64e460 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -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; } |