[ELF] - Handle symbols with default version early.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 7 Jul 2017 08:29:51 +0000 (08:29 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 7 Jul 2017 08:29:51 +0000 (08:29 +0000)
commit85e9216e8c30323d62a727af0d956df10513d3db
treeabb6fa6d5856b7789407c9d18edd890ecfe4726b
parent15e3de1c1ed812057e125879a1669681de89a9b8
[ELF] - Handle symbols with default version early.

This fixes last testcase provided in PR28414.
In short issue is next: when we had X@@Version symbol in object A,
we did not resolve it to X early. Then when in another object B
we had reference to undefined X, symbol X from archive was fetched.
Since both archive and object A contains another symbol Z, duplicate
symbol definition was triggered as a result.

Correct behavior is to use X@@Version from object A instead and do not fetch
any symbols from archive.

Differential revision: https://reviews.llvm.org/D35059

llvm-svn: 307364
lld/ELF/SymbolTable.cpp
lld/test/ELF/Inputs/symver-archive1.s [new file with mode: 0644]
lld/test/ELF/Inputs/symver-archive2.s [new file with mode: 0644]
lld/test/ELF/symver-archive.s [new file with mode: 0644]