Don't crash trying to write an 0 addend.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 6 Dec 2016 12:19:24 +0000 (12:19 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 6 Dec 2016 12:19:24 +0000 (12:19 +0000)
commite004d4bfc25aef1187b0eaf71081c9322a1717ed
tree7c19c4649f718214c5a7fe6b2810d7270bb8dd15
parent43c3cb7786814376e8ccba837f1db207f49c41dc
Don't crash trying to write an 0 addend.

For preemptable symbols the dynamic linker does all the work. Trying
to compute the addend is at best wasteful and can also lead to crashes
in cases of programs that uses tls but doesn't define any tls
variables.

llvm-svn: 288803
lld/ELF/Relocations.cpp
lld/test/ELF/Inputs/i386-tls-got.s [new file with mode: 0644]
lld/test/ELF/i386-tls-got.s [new file with mode: 0644]