Modify ObjectFileELF::GetArchitecture() to avoid calling ParseSectionHeaders() when we have headers.
Change by Matthew Gardiner. llvm-svn: 212825
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user