[PATCH] D21745: [ELF] - Implemented --no-undefined-version flag
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 06:59:20 PDT 2016
grimar 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">;
+
----------------
ruiu wrote:
> "Report version scripts that refer nonexistent symbols."
nonexistent != undefined, but we also report about undefined ones (that is also what gold do).
"Report version scripts that refer non defines 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;
+
----------------
ruiu wrote:
> 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?)
Yes, I think this can be, there is no point to assign version to undefined symbol I think.
gold uses something like "gold: error: version script assignment of LIBSAMPLE_3.0 to symbol d failed: symbol not defined".
http://reviews.llvm.org/D21745
More information about the llvm-commits
mailing list