[lld] r315737 - [ELF] Recognize additional relocation types
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 13 12:30:00 PDT 2017
Author: phosek
Date: Fri Oct 13 12:30:00 2017
New Revision: 315737
URL: http://llvm.org/viewvc/llvm-project?rev=315737&view=rev
Log:
[ELF] Recognize additional relocation types
These are generated by the linker itself and it shouldn't treat
them as unrecognized. This was introduced in r315552 and is triggering
an error when building UBSan shared library for i386.
Differential Revision: https://reviews.llvm.org/D38899
Modified:
lld/trunk/ELF/Arch/X86.cpp
Modified: lld/trunk/ELF/Arch/X86.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/X86.cpp?rev=315737&r1=315736&r2=315737&view=diff
==============================================================================
--- lld/trunk/ELF/Arch/X86.cpp (original)
+++ lld/trunk/ELF/Arch/X86.cpp Fri Oct 13 12:30:00 2017
@@ -290,6 +290,8 @@ void X86::relocateOne(uint8_t *Loc, RelT
case R_386_PC32:
case R_386_PLT32:
case R_386_RELATIVE:
+ case R_386_TLS_DTPMOD32:
+ case R_386_TLS_DTPOFF32:
case R_386_TLS_GD:
case R_386_TLS_GOTIE:
case R_386_TLS_IE:
@@ -297,6 +299,8 @@ void X86::relocateOne(uint8_t *Loc, RelT
case R_386_TLS_LDO_32:
case R_386_TLS_LE:
case R_386_TLS_LE_32:
+ case R_386_TLS_TPOFF:
+ case R_386_TLS_TPOFF32:
checkInt<32>(Loc, Val, Type);
write32le(Loc, Val);
break;
More information about the llvm-commits
mailing list