diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-31 18:20:51 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-31 18:20:51 +0000 |
commit | 5b712efd9a4d29119ce136d46a23454bdc103f68 (patch) | |
tree | bc70eedd44b22a4a546c01bb808b592d4c62b089 /include/llvm/Object/ELF.h | |
parent | 2e594fa85c809178ce598a9b4c3a3bf5e0e6a14e (diff) |
Fix bits check in ELFObjectFile::isSectionZeroInit().
Fixes PR14723.
Patch by Sami Liedes!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object/ELF.h')
-rw-r--r-- | include/llvm/Object/ELF.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index 1634789809..fcd77c74ab 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -1306,10 +1306,7 @@ error_code ELFObjectFile<target_endianness, is64Bits> const Elf_Shdr *sec = reinterpret_cast<const Elf_Shdr *>(Sec.p); // For ELF, all zero-init sections are virtual (that is, they occupy no space // in the object image) and vice versa. - if (sec->sh_flags & ELF::SHT_NOBITS) - Result = true; - else - Result = false; + Result = sec->sh_type == ELF::SHT_NOBITS; return object_error::success; } |