[lld] r245280 - COFF: Do not handle __NULL_IMPORT_DESCRIPTOR differently than the other symbols.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 02:06:41 PDT 2015


Author: ruiu
Date: Tue Aug 18 04:06:41 2015
New Revision: 245280

URL: http://llvm.org/viewvc/llvm-project?rev=245280&view=rev
Log:
COFF: Do not handle __NULL_IMPORT_DESCRIPTOR differently than the other symbols.

__NULL_IMPORT_DESCRIPTOR is a symbol used by MSVC liner to construct
the import descriptor table. We do not use the symbol. Previously,
we had code to skip that symbol. That code does not actually do
anything meaningful because no one is referencing the symbol, the
symbol would naturally be ignored. This patch stops recognizing
the symbol.

Modified:
    lld/trunk/COFF/InputFiles.cpp

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=245280&r1=245279&r2=245280&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Tue Aug 18 04:06:41 2015
@@ -63,13 +63,8 @@ void ArchiveFile::parse() {
   LazySymbols.reserve(NumSyms);
 
   // Read the symbol table to construct Lazy objects.
-  uint32_t I = 0;
-  for (const Archive::Symbol &Sym : File->symbols()) {
-    auto *B = new (&Buf[I++]) Lazy(this, Sym);
-    // Skip special symbol exists in import library files.
-    if (B->getName() != "__NULL_IMPORT_DESCRIPTOR")
-      LazySymbols.push_back(B);
-  }
+  for (const Archive::Symbol &Sym : File->symbols())
+    LazySymbols.push_back(new (Buf++) Lazy(this, Sym));
 
   // Seen is a map from member files to boolean values. Initially
   // all members are mapped to false, which indicates all these files




More information about the llvm-commits mailing list