Fix some confusion about what can be preempted.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 26 Feb 2016 14:27:47 +0000 (14:27 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 26 Feb 2016 14:27:47 +0000 (14:27 +0000)
commit993f0273e3998f8b15a52a2feade074917d20113
treecb6a4b04b6408328fda66cd53478ca4d83fe2742
parent31d315b349947ce4c46bb348776480c658876793
Fix some confusion about what can be preempted.

For shared libraries we allow any weak undefined symbol to eventually be
resolved, even if we never see a definition in another .so. This matches
the behavior when handling other undefined symbols in a shared library.

For executables, we require seeing a definition in a .so or resolve it
to zero. This is also similar to how non weak symbols are handled.

llvm-svn: 262017
lld/ELF/InputSection.cpp
lld/ELF/OutputSections.cpp
lld/ELF/OutputSections.h
lld/ELF/Target.cpp
lld/ELF/Target.h
lld/ELF/Writer.cpp
lld/test/ELF/Inputs/dynamic-reloc-weak.s [new file with mode: 0644]
lld/test/ELF/Inputs/plt-aarch64.s [new file with mode: 0644]
lld/test/ELF/dynamic-reloc-weak.s
lld/test/ELF/plt-aarch64.s