[PATCH] D21555: [ELF] - Do not allow mix global symbols version.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 12:48:57 PDT 2016


rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.

I disagree with Davide on this one.

The code is very simple and can be easily reverted if we find scripts depending on it. While that, having this restriction makes it easier to reason about the rest of the implementation without having to think what the correct behaviour is when a symbol is in two versions.


================
Comment at: ELF/SymbolTable.cpp:535
@@ +534,3 @@
+      if (SymbolBody *B = find(Name)) {
+        if (B->symbol()->VersionId > VER_NDX_GLOBAL)
+          error("duplicate symbol " + Name + " in version script");
----------------
Using > with an opaque constant is a bit odd. Please use !=.


http://reviews.llvm.org/D21555





More information about the llvm-commits mailing list