summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
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
commit1b2d526c8bbc5b9a3961f854fa71b59b8bbb8e3b (patch)
treef80695ac348bea809462fa49f0721321550e101e /llvm/lib/ExecutionEngine
parent70d77d144b34b5ca3bc307ec8ef384525a530446 (diff)
downloadbcm5719-llvm-1b2d526c8bbc5b9a3961f854fa71b59b8bbb8e3b.tar.gz
bcm5719-llvm-1b2d526c8bbc5b9a3961f854fa71b59b8bbb8e3b.zip
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. llvm-svn: 131243
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 065e5e3d8a3..7548a87c955 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud