[PATCH] D35207: [ELF] - Give a symbol version extracted from name a priority over version set by script.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 03:02:24 PDT 2017
grimar added inline comments.
================
Comment at: ELF/Symbols.h:366-370
+ // Symbols can have version baked in their names. If flag is true
+ // that means version was set from name, such version has priority
+ // over versions from script.
+ unsigned GotVersionFromName : 1;
----------------
ruiu wrote:
> Do you really need this? You could just call parseSymbolVersion after processing version scripts, no?
I can drop this flag with a cost of one more lookup of '@' (updated the diff to demonstrate).
Without that it will not work so simple becaue of next:
When we have symbol `foo@@VER2` we drop version and add it as `foo` to SymbolTable.
One of steps proccessing version scripts is a call of `assignExactVersion` and it do:
```
std::vector<SymbolBody *> Syms = findByVersion(Ver);
```
For this call `Ver.Name` is `foo` for `VER1` and `VER2`. Hence it will try to assign version to the same
symbol twice and will report warning.
https://reviews.llvm.org/D35207
More information about the llvm-commits
mailing list