[PATCH] D22433: Handle versioned symbols efficiently.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 16 23:29:08 PDT 2016
grimar accepted this revision.
grimar added a comment.
This revision is now accepted and ready to land.
In https://reviews.llvm.org/D22433#486255, @ruiu wrote:
> No, it won't bring back the issue as this code works only when you pass a version script. I verified that using the reproduce file that Ed posted.
Right, I see. LGTM with few nits.
================
Comment at: ELF/SymbolTable.cpp:598
@@ +597,3 @@
+ Len = std::max(Len, V.Name.size());
+ return Len;
+}
----------------
I think return size_t would be more clean.
================
Comment at: ELF/SymbolTable.cpp:626
@@ +625,3 @@
+ if (V.Name == Verstr)
+ return {Name, IsDefault ? V.Id : (V.Id | VERSYM_HIDDEN)};
+
----------------
This required the next change for me to compile using msvs2015:
```
for (elf::VersionDefinition &V : Config->VersionDefinitions) {
if (V.Name == Verstr)
return{ Name, IsDefault ? V.Id : (V.Id | VERSYM_HIDDEN) };
}
```
https://reviews.llvm.org/D22433
More information about the llvm-commits
mailing list