[ELF] Do not error for missing version when symbol has local version.
authorPeter Smith <peter.smith@linaro.org>
Mon, 14 May 2018 10:13:56 +0000 (10:13 +0000)
committerPeter Smith <peter.smith@linaro.org>
Mon, 14 May 2018 10:13:56 +0000 (10:13 +0000)
commit796fb999b358f9d060946f8a54e0cc7501ec3f61
treedbc1628e15b900a41934cac7396e14217d7bd483
parenta49a91b5557e5caf1c7e6cd0ada4dabb50e2caf3
[ELF] Do not error for missing version when symbol has local version.

If a symbol with an undefined version in a DSO is not going to be
exported into the dynamic symbol table then do not give an error message
for the missing version. This can happen with the --exclude-libs option
which implicitly gives all symbols in a static library the local version.
This matches the behavior of ld.gold and is exploited by the Bionic
dynamic linker on Arm.

Differential Revision: https://reviews.llvm.org/D43126

llvm-svn: 332224
lld/ELF/Symbols.cpp
lld/test/ELF/Inputs/versiondef.s [new file with mode: 0644]
lld/test/ELF/version-exclude-libs.s [new file with mode: 0644]