[PATCH] D52382: [LLD] [COFF] Don't do autoexport of symbols from GNU import libraries

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 14:44:16 PDT 2018


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: COFF/MinGW.cpp:131
 
-  // Don't export anything that looks like an import symbol (which also can be
-  // a manually defined data symbol with such a name); don't export artificial
-  // symbols like .refptr pointer stubs.
-  if (Sym->getName().startswith("__imp_") || Sym->getName().startswith("."))
-    return false;
+  for (auto Prefix : ExcludeSymbolPrefixes.keys())
+    if (Sym->getName().startswith(Prefix))
----------------
auto -> StringRef


================
Comment at: COFF/MinGW.cpp:134
+      return false;
+  for (auto Suffix : ExcludeSymbolSuffixes.keys())
+    if (Sym->getName().endswith(Suffix))
----------------
Ditto


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52382





More information about the llvm-commits mailing list