Improved detection of object file types, moving
detection of kernels into the object file and
adding a new category for raw binary images.
Fixed all clients who previously searched for
sections manually, making them use the object
file's facilities instead.

llvm-svn: 150272
diff --git a/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp b/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
index 4d5ae55..a1d6442 100644
--- a/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp
@@ -33,6 +33,19 @@
             create = true;
     }
     
+    if (!create)
+    {
+        Module *exe_module = process->GetTarget().GetExecutableModulePointer();
+        if (exe_module)
+        {
+            ObjectFile *object_file = exe_module->GetObjectFile();
+            if (object_file)
+            {
+                create = (object_file->GetStrata() == ObjectFile::eStrataRawImage);
+            }
+        }
+    }
+    
     if (create)
         return new DynamicLoaderStatic (process);
     return NULL;