Modify ObjectFileELF::GetArchitecture() to avoid calling ParseSectionHeaders() when...
authorTodd Fiala <todd.fiala@gmail.com>
Fri, 11 Jul 2014 15:43:51 +0000 (15:43 +0000)
committerTodd Fiala <todd.fiala@gmail.com>
Fri, 11 Jul 2014 15:43:51 +0000 (15:43 +0000)
Change by Matthew Gardiner.

llvm-svn: 212825

lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

index 1aaad6a..e7266d2 100644 (file)
@@ -2569,8 +2569,11 @@ ObjectFileELF::GetArchitecture (ArchSpec &arch)
     if (!ParseHeader())
         return false;
 
-    // Allow elf notes to be parsed which may affect the detected architecture.
-    ParseSectionHeaders();
+    if (m_section_headers.empty())
+    {
+        // Allow elf notes to be parsed which may affect the detected architecture.
+        ParseSectionHeaders();
+    }
 
     arch = m_arch_spec;
     return true;