diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-10-03 09:33:00 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-10-03 09:33:00 +0000 |
| commit | f79a8ef2aec6a94e105bc25fd21a8d187fa59643 (patch) | |
| tree | d2dcd4060ffe2e05cce1e1860a669348c9f52914 /llvm/lib | |
| parent | 3832d7c25df912a08816d7df30d98a23442452b1 (diff) | |
| download | bcm5719-llvm-f79a8ef2aec6a94e105bc25fd21a8d187fa59643.tar.gz bcm5719-llvm-f79a8ef2aec6a94e105bc25fd21a8d187fa59643.zip | |
[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
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions

