From ef1b5334b2b34f2c07dcadabe686d95e88e73cc9 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 12 Aug 2013 22:59:14 +0000 Subject: [PATCH] [Object/ELF] sh_type is not a bitfield. Fixes RuntimeDyld test failure on ARM. llvm-svn: 188220 --- llvm/include/llvm/Object/ELFObjectFile.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Object/ELFObjectFile.h b/llvm/include/llvm/Object/ELFObjectFile.h index 08cac04ac6d2..f799f7e26a18 100644 --- a/llvm/include/llvm/Object/ELFObjectFile.h +++ b/llvm/include/llvm/Object/ELFObjectFile.h @@ -577,14 +577,14 @@ ELFObjectFile::isSectionRequiredForExecution(DataRefImpl Sec, template error_code ELFObjectFile::isSectionVirtual(DataRefImpl Sec, bool &Result) const { - Result = toELFShdrIter(Sec)->sh_type & ELF::SHT_NOBITS; + Result = toELFShdrIter(Sec)->sh_type == ELF::SHT_NOBITS; return object_error::success; } template error_code ELFObjectFile::isSectionZeroInit(DataRefImpl Sec, bool &Result) const { - Result = toELFShdrIter(Sec)->sh_type & ELF::SHT_NOBITS; + Result = toELFShdrIter(Sec)->sh_type == ELF::SHT_NOBITS; return object_error::success; }