[gold] Fix common symbols handling.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 11 Mar 2016 00:51:57 +0000 (00:51 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 11 Mar 2016 00:51:57 +0000 (00:51 +0000)
commit4dc3c8df45f30145b26129c3766b0eec5e894f44
tree845a40f0c96ea8a98849dea8d044051874c2212a
parentb1b5cc83f1090f91a320b079282e22df2ea77ad5
[gold] Fix common symbols handling.

LLVM Gold plugin decides which instance of a common symbol it wants
based on the symbol size in claim_file_hook. If the file that
contains the chosen instance is later dropped from the link, we end
up with an undefined reference.

This change delays this decision until the set of the included files
is known.

llvm-svn: 263180
llvm/test/tools/gold/X86/Inputs/start-lib-common.ll [new file with mode: 0644]
llvm/test/tools/gold/X86/start-lib-common.ll [new file with mode: 0644]
llvm/tools/gold/gold-plugin.cpp