[llvm] r219479 - Object, COFF: Relax aux symbols for section definitions

David Majnemer david.majnemer at gmail.com
Thu Oct 9 23:58:12 PDT 2014


Author: majnemer
Date: Fri Oct 10 01:58:11 2014
New Revision: 219479

URL: http://llvm.org/viewvc/llvm-project?rev=219479&view=rev
Log:
Object, COFF: Relax aux symbols for section definitions

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.

Modified:
    llvm/trunk/include/llvm/Object/COFF.h

Modified: llvm/trunk/include/llvm/Object/COFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/COFF.h?rev=219479&r1=219478&r2=219479&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/COFF.h (original)
+++ llvm/trunk/include/llvm/Object/COFF.h Fri Oct 10 01:58:11 2014
@@ -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;
   }
 





More information about the llvm-commits mailing list