Fix ARM attribute parsing for Android after rL267291

Differential revision: http://reviews.llvm.org/D19480

llvm-svn: 267422
This commit is contained in:
Tamas Berghammer
2016-04-25 15:51:45 +00:00
parent 6d547205f0
commit 0237eda929
2 changed files with 26 additions and 14 deletions

View File

@@ -1740,12 +1740,9 @@ ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl &section_headers,
{
DataExtractor data;
if (sheader.sh_type != SHT_ARM_ATTRIBUTES)
continue;
if (section_size == 0 || set_data(data, sheader.sh_offset, section_size) != section_size)
continue;
ParseARMAttributes(data, section_size, arch_spec);
if (sheader.sh_type == SHT_ARM_ATTRIBUTES && section_size != 0 &&
set_data(data, sheader.sh_offset, section_size) == section_size)
ParseARMAttributes(data, section_size, arch_spec);
}
if (name == g_sect_name_gnu_debuglink)