summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-05-12 21:21:16 +0000
committerJim Grosbach <grosbach@apple.com>2011-05-12 21:21:16 +0000
commit757a142ea845ee44cc9340063bbc2f992e8c4232 (patch)
tree64c88caac84417e621730b904586397ae2771ad3 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
parent7139d3516526317497e70348e33a57b52ddc053c (diff)
downloadllvm-757a142ea845ee44cc9340063bbc2f992e8c4232.tar.gz
llvm-757a142ea845ee44cc9340063bbc2f992e8c4232.tar.bz2
llvm-757a142ea845ee44cc9340063bbc2f992e8c4232.tar.xz
MCJIT section loading should just skip non-text sections rather than
erroring out completely. Some modules produce sections that aren't referenced, so it's friendlier to clients like LLDB to just skip them, at least for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131243 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 065e5e3d8a..7548a87c95 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -268,9 +268,9 @@ loadSegment32(const MachOObject *Obj,
if (!Sect)
return Error("unable to load section: '" + Twine(SectNum) + "'");
- // FIXME: Improve check.
+ // FIXME: For the time being, we're only loading text segments.
if (Sect->Flags != 0x80000400)
- return Error("unsupported section type!");
+ continue;
// Address and names of symbols in the section.
typedef std::pair<uint64_t, StringRef> SymbolEntry;
@@ -403,9 +403,9 @@ loadSegment64(const MachOObject *Obj,
if (!Sect)
return Error("unable to load section: '" + Twine(SectNum) + "'");
- // FIXME: Improve check.
+ // FIXME: For the time being, we're only loading text segments.
if (Sect->Flags != 0x80000400)
- return Error("unsupported section type!");
+ continue;
// Address and names of symbols in the section.
typedef std::pair<uint64_t, StringRef> SymbolEntry;