[PATCH] D19464: ELF: Create .gnu.version and .gnu.version_r sections when linking against versioned DSOs.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 02:26:39 PDT 2016


grimar added a comment.

I am good familar with this feature, so have just few minor comments


================
Comment at: ELF/InputFiles.cpp:452
@@ +451,3 @@
+    // sequentially starting from 1, so we predict that the largest identifier
+    // will be VerdefCount+1.
+    unsigned VerdefCount = VerdefSec->sh_info;
----------------
VerdefCount + 1

================
Comment at: ELF/InputFiles.h:278
@@ +277,3 @@
+  // Used for symbol versioning
+
+  struct NeededVer {
----------------
Excessive empty line, no dot at the end of comment.

================
Comment at: ELF/OutputSections.cpp:1508
@@ +1507,3 @@
+    return;
+  Out<ELFT>::VerNeed->addSymbol(SS);
+}
----------------
I would write:
```
if (auto *SS = dyn_cast<SharedSymbol<ELFT>>(B))
  Out<ELFT>::VerNeed->addSymbol(SS);
```


http://reviews.llvm.org/D19464





More information about the llvm-commits mailing list