[PATCH] D48857: Also search BitcodeFiles for exclude-lib symbols

Yi Kong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 16:26:00 PDT 2018


kongyi created this revision.
kongyi added a reviewer: ruiu.
Herald added subscribers: llvm-commits, dexonsmith, arichardson, mehdi_amini, emaste.
Herald added a reviewer: espindola.

Archives created with ThinLTO are bitcodes, they also need to be searched for excluded symbols.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D48857

Files:
  ELF/Driver.cpp


Index: ELF/Driver.cpp
===================================================================
--- ELF/Driver.cpp
+++ ELF/Driver.cpp
@@ -1159,6 +1159,13 @@
         for (Symbol *Sym : File->getSymbols())
           if (!Sym->isLocal() && Sym->File == File)
             Sym->VersionId = VER_NDX_LOCAL;
+
+  for (BitcodeFile *File : BitcodeFiles)
+    if (!File->ArchiveName.empty())
+      if (All || Libs.count(path::filename(File->ArchiveName)))
+        for (Symbol *Sym : File->getSymbols())
+          if (!Sym->isLocal() && Sym->File == File)
+            Sym->VersionId = VER_NDX_LOCAL;
 }
 
 // Force Sym to be entered in the output. Used for -u or equivalent.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48857.153824.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180702/3bd15e44/attachment.bin>


More information about the llvm-commits mailing list