[PATCH] D21745: [ELF] - Implemented --no-undefined-version flag

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 06:47:04 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/Options.td:112
@@ +111,3 @@
+def no_undefined_version: F<"no-undefined-version">,
+  HelpText<"Issue error if version script explicitly lists not defined symbol">;
+
----------------
  "Report version scripts that refer nonexistent symbols."

================
Comment at: ELF/SymbolTable.cpp:535-538
@@ +534,6 @@
+      SymbolBody *B = find(Name);
+      if (Config->NoUndefinedVersion && (!B || B->isUndefined()))
+        error("version script lists not defined symbol: " + Name);
+      if (!B)
+        continue;
+
----------------
This can be

  if (!B || B->isUndefined()) {
    if (Config->NoUndefinedVersion)
      error("version script refers an undefined symbol: " + Name);
    continue;
  }

?

(is "version script lists not defined symbol" the error message that gold uses?)


http://reviews.llvm.org/D21745





More information about the llvm-commits mailing list