Add R_386_TLS_LE as a relocation having an implicit addend.
authorEd Schouten <ed@nuxi.nl>
Sat, 20 Aug 2016 10:54:51 +0000 (10:54 +0000)
committerEd Schouten <ed@nuxi.nl>
Sat, 20 Aug 2016 10:54:51 +0000 (10:54 +0000)
commit21483f56366aec1ed5abd2961601680a77ac3b12
treef205baead05358f78384f1cd18fc92e00d93fa40
parent51b9a0e8e8ab7b6ad0458163248035afef08d5b4
Add R_386_TLS_LE as a relocation having an implicit addend.

TLS on i386 in non-PIE/PIC code seems broken right now, because we don't
properly add the addend encoded in the instruction to the resulting
offset when processing R_386_TLS_LE relocations.

Extend one of the existing tests for TLS on i686 to use an addend.

PR: https://llvm.org/bugs/show_bug.cgi?id=29068
Reviewed by: ruiu
Differential Revision: https://reviews.llvm.org/D23741

llvm-svn: 279368
lld/ELF/Target.cpp
lld/test/ELF/tls-i686.s