Don't resolve hidden undef to a DSO.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 4 Apr 2017 20:03:34 +0000 (20:03 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 4 Apr 2017 20:03:34 +0000 (20:03 +0000)
commit8465d083921c56ac35d2c292da316dd470641ef2
treea7e56e836ccbe376a1294cb5f324935b015e0e02
parent08f943c5630d8ee31d6a93227171d2f05db59e62
Don't resolve hidden undef to a DSO.

The ELF spec says:

all of the non-default visibility attributes, when applied to a symbol
reference, imply that a definition to satisfy that reference must be
provided within the current executable or shared object.

But we were trying to resolve those undef references to shared
symbols. That causes odd results like creating a got entry with
a relocation pointing to 0.

llvm-svn: 299464
lld/ELF/SymbolTable.cpp
lld/test/ELF/hidden-vis-shared.s [new file with mode: 0644]