[ELF] - Fix missing relocation when linking executable with --unresolved-symbols...
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 27 Jul 2017 07:31:31 +0000 (07:31 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 27 Jul 2017 07:31:31 +0000 (07:31 +0000)
commit678188d48bfeb8b9e3d47632682d178fc35ef0f2
treee017dc99d5c0001395bd643505ddbb3b5a14afea
parent88ac9a8c07eb20ae2de5084c435ccfc519e056f5
[ELF] - Fix missing relocation when linking executable with --unresolved-symbols=ignore-all

This is PR32112. Previously when we linked executable with
--unresolved-symbols=ignore-all and undefined symbols, like:

_start:
callq und@PLT

we did not create relocations, though it looks in that case
we should delegate handling of such symbols to runtime linker,
hence should emit them. Patch fixes that.

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

llvm-svn: 309252
lld/ELF/Symbols.cpp
lld/test/ELF/executable-undefined-ignoreall.s [new file with mode: 0644]
lld/test/ELF/executable-undefined-protected-ignoreall.s [new file with mode: 0644]
lld/test/ELF/no-inhibit-exec.s