File tree Expand file tree Collapse file tree 4 files changed +5
-20
lines changed Expand file tree Collapse file tree 4 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -1215,7 +1215,6 @@ template <class ELFT> void ObjFile<ELFT>::postParse() {
1215
1215
Err (ctx) << " TLS attribute mismatch: " << &sym << " \n >>> in " << sym.file
1216
1216
<< " \n >>> in " << this ;
1217
1217
1218
- hasVersionSyms |= sym.hasVersionSuffix ;
1219
1218
// Handle non-COMMON defined symbol below. !sym.file allows a symbol
1220
1219
// assignment to redefine a symbol without an error.
1221
1220
if (!sym.isDefined () || secIdx == SHN_UNDEF)
@@ -1591,8 +1590,6 @@ template <class ELFT> void SharedFile::parse() {
1591
1590
s->dsoDefined = true ;
1592
1591
if (s->file == this )
1593
1592
s->versionId = idx;
1594
- symbols[firstGlobal + i] = s;
1595
- hasVersionSyms = true ;
1596
1593
}
1597
1594
}
1598
1595
Original file line number Diff line number Diff line change @@ -241,7 +241,6 @@ class ELFFileBase : public InputFile {
241
241
StringRef sourceFile;
242
242
uint32_t andFeatures = 0 ;
243
243
bool hasCommonSyms = false ;
244
- bool hasVersionSyms = false ;
245
244
ArrayRef<uint8_t > aarch64PauthAbiCoreInfo;
246
245
};
247
246
Original file line number Diff line number Diff line change @@ -353,21 +353,9 @@ void SymbolTable::scanVersionScript() {
353
353
// Symbol themselves might know their versions because symbols
354
354
// can contain versions in the form of <name>@<version>.
355
355
// Let them parse and update their names to exclude version suffix.
356
- for (ELFFileBase *file : ctx.objectFiles ) {
357
- if (!file->hasVersionSyms )
358
- continue ;
359
- for (Symbol *sym : file->getGlobalSymbols ())
360
- if (sym->hasVersionSuffix )
361
- sym->parseSymbolVersion (ctx);
362
- }
363
- // Only used for undefined symbol suggestion.
364
- for (ELFFileBase *file : ctx.sharedFiles ) {
365
- if (!file->hasVersionSyms )
366
- continue ;
367
- for (Symbol *sym : file->getGlobalSymbols ())
368
- if (sym && sym->hasVersionSuffix )
369
- sym->parseSymbolVersion (ctx);
370
- }
356
+ for (Symbol *sym : symVector)
357
+ if (sym->hasVersionSuffix )
358
+ sym->parseSymbolVersion (ctx);
371
359
372
360
// isPreemptible is false at this point. To correctly compute the binding of a
373
361
// Defined (which is used by includeInDynsym(ctx)), we need to know if it is
Original file line number Diff line number Diff line change 139
139
140
140
# W3: error: undefined symbol: __wrap_foo@v1
141
141
# W3-NEXT: >>> referenced by {{.*}}ref1.o:(.text+0x1)
142
- # W3-NOT: {{.}}
142
+ # W3-NEXT: >>> did you mean: __wrap_foo{{$}}
143
+ # W3-NEXT: >>> defined in: {{.*}}wrap.o
143
144
144
145
## foo@v1 is correctly wrapped.
145
146
# RUN: ld.lld -shared --soname=t --version-script=%t/ver --wrap=foo@v1 %t/ref.o %t/ref1.o %t/def1.o %t/wrap1.o -o %t.w4
You can’t perform that action at this time.
0 commit comments