[lld] r182721 - [PECOFF] Skip section names in the symbol table because they are not atoms.

Rui Ueyama ruiu at google.com
Sun May 26 16:09:01 PDT 2013


Author: ruiu
Date: Sun May 26 18:09:01 2013
New Revision: 182721

URL: http://llvm.org/viewvc/llvm-project?rev=182721&view=rev
Log:
[PECOFF] Skip section names in the symbol table because they are not atoms.

Modified:
    lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp

Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=182721&r1=182720&r2=182721&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Sun May 26 18:09:01 2013
@@ -255,6 +255,11 @@ public:
         UndefinedAtoms._atoms.push_back(
           new (AtomStorage.Allocate<COFFUndefinedAtom>())
             COFFUndefinedAtom(*this, Name));
+      } else if (   Symb->StorageClass == llvm::COFF::IMAGE_SYM_CLASS_STATIC
+                 && Symb->Value == 0) {
+        // A symbol with IMAGE_SYM_CLASS_STATIC and zero value represents a
+        // section name. This is redundant and we can safely skip this here
+        // because the same section name is also in the section header.
       } else {
         // This is actually a defined symbol. Add it to its section's list of
         // symbols.





More information about the llvm-commits mailing list