summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2014-07-11 15:43:51 +0000
committerTodd Fiala <todd.fiala@gmail.com>2014-07-11 15:43:51 +0000
commit09512ec2afab0eb380c2cf0bc2aa3b0125b19ce3 (patch)
treefd1eadc2f44f5d3c72bd87942f8920915c821e0b /lldb/source/Plugins/ObjectFile/ELF
parent7c06819ecdce83d1375b754183c90b7f4e4b8a8a (diff)
downloadbcm5719-llvm-09512ec2afab0eb380c2cf0bc2aa3b0125b19ce3.tar.gz
bcm5719-llvm-09512ec2afab0eb380c2cf0bc2aa3b0125b19ce3.zip
Modify ObjectFileELF::GetArchitecture() to avoid calling ParseSectionHeaders() when we have headers.
Change by Matthew Gardiner. llvm-svn: 212825
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 1aaad6a40ce..e7266d2776d 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -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;
OpenPOWER on IntegriCloud