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 | fa8cd9d64a3bd090d9176ea019a6d1b6b2051dd0 (patch) | |
tree | e189f5246734f955e7c64b4a215fbb9b0c0dac83 /lib/ExecutionEngine | |
parent | e6c3cc8dc5437069f71a38188173835ba4fb0dc1 (diff) | |
download | external_llvm-fa8cd9d64a3bd090d9176ea019a6d1b6b2051dd0.zip external_llvm-fa8cd9d64a3bd090d9176ea019a6d1b6b2051dd0.tar.gz external_llvm-fa8cd9d64a3bd090d9176ea019a6d1b6b2051dd0.tar.bz2 |
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
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 414957c..08aba64 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/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; } |