George Rimar f79a8ef2ae [ELF] - Do not forget to include to .dymsym symbols that were converted to Defined.
This is the fix for
"Bug 39104 - LLD links incorrect ELF executable if version script contains "local: *;"
(https://bugs.llvm.org/show_bug.cgi?id=39104).

The issue happens when we have non-PIC program call to function in a shared library.
(for example, the PR above has R_X86_64_PC32 relocation against __libc_start_main)

LLD converts symbol to Defined in that case with the use of replaceWithDefined()

The issue is that after above we create a broken relocation because do not
include the symbol into .dynsym.

That happens when the version script is used because we treat the symbol as
STB_LOCAL if the following condition match:
VersionId == VER_NDX_LOCAL && isDefined() and do not include it to
.dynsym because of that. Patch fixes the issue.

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

llvm-svn: 343668
2018-10-03 09:33:00 +00:00
..
2018-03-30 23:13:00 +00:00
2017-10-27 03:14:09 +00:00
2018-04-10 13:15:21 +00:00
2017-11-17 08:17:21 +00:00
2018-09-11 14:37:27 +00:00
2018-09-11 14:37:27 +00:00
2018-03-14 20:29:45 +00:00
2016-03-12 06:06:40 +00:00
2018-08-22 07:02:26 +00:00
2018-08-22 07:02:26 +00:00
2018-08-09 17:59:56 +00:00

See docs/NewLLD.rst