File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1668,11 +1668,15 @@ static void excludeLibs(opt::InputArgList &args) {
1668
1668
bool all = libs.count (" ALL" );
1669
1669
1670
1670
auto visit = [&](InputFile *file) {
1671
- if (!file->archiveName .empty ())
1672
- if (all || libs.count (path::filename (file->archiveName )))
1673
- for (Symbol *sym : file->getSymbols ())
1674
- if (!sym->isUndefined () && !sym->isLocal () && sym->file == file)
1675
- sym->versionId = VER_NDX_LOCAL;
1671
+ if (file->archiveName .empty () ||
1672
+ !(all || libs.count (path::filename (file->archiveName ))))
1673
+ return ;
1674
+ ArrayRef<Symbol *> symbols = file->getSymbols ();
1675
+ if (isa<ELFFileBase>(file))
1676
+ symbols = cast<ELFFileBase>(file)->getGlobalSymbols ();
1677
+ for (Symbol *sym : symbols)
1678
+ if (!sym->isUndefined () && sym->file == file)
1679
+ sym->versionId = VER_NDX_LOCAL;
1676
1680
};
1677
1681
1678
1682
for (ELFFileBase *file : objectFiles)
You can’t perform that action at this time.
0 commit comments