From 1e0e306deb1d8dbf6a98ccec4bce3cdbe02e0ddd Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 10 Oct 2014 06:58:11 +0000 Subject: [PATCH] Object, COFF: Relax aux symbols for section definitions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We, I suppose naïvely, believed the COFF specification with regard to auxiliary symbol records which defined sections: they specified that the symbol value should be zero. However, dumpbin and MinGW's objdump do not consider the symbol value as a restriction. Relaxing this allows us to properly dump MinGW linked executables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219479 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/COFF.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index c3428cdd1aa..d9cd2a6e6d0 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -328,8 +328,7 @@ public: bool isAppdomainGlobal = getStorageClass() == COFF::IMAGE_SYM_CLASS_EXTERNAL && getSectionNumber() == COFF::IMAGE_SYM_ABSOLUTE; - bool isOrdinarySection = - getStorageClass() == COFF::IMAGE_SYM_CLASS_STATIC && getValue() == 0; + bool isOrdinarySection = getStorageClass() == COFF::IMAGE_SYM_CLASS_STATIC; return isAppdomainGlobal || isOrdinarySection; } -- 2.34.1