[PATCH] D21890: [ELF] - Do not error out when version declaration not found when building executable.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 02:59:58 PDT 2016


grimar added a comment.

In http://reviews.llvm.org/D21890#472197, @ruiu wrote:

> So, if a symbol contains '@' and version scripts are given, then it is an error, right?


If we are building DSO and we have version script and we have symbol that has @,
which version name is not in the script, that is an error. The same probably logically
apply for executable case.
But if we dont have script and build executable, that is in common, so that is not error I think.

So I can expand the checks like that (pseudocode):

  if (!Config->Shared && HaveNoVersionScript) {
    Config->SymbolVersions.push_back(elf::Version(Version));
    return Default ? I : (I | VERSYM_HIDDEN);
  }


http://reviews.llvm.org/D21890





More information about the llvm-commits mailing list