From 371290dfd400c5c26843b9c127ae13968cafdf2e Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 24 Nov 2021 20:43:58 -0800 Subject: [PATCH] [ELF] Remove unneeded DF_STATIC_TLS for EM_386 local-exec TLS which is also untested. --- lld/ELF/Arch/X86.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lld/ELF/Arch/X86.cpp b/lld/ELF/Arch/X86.cpp index 5d34b769e80e..6b0fae3b6d73 100644 --- a/lld/ELF/Arch/X86.cpp +++ b/lld/ELF/Arch/X86.cpp @@ -78,12 +78,7 @@ int X86::getTlsGdRelaxSkip(RelType type) const { RelExpr X86::getRelExpr(RelType type, const Symbol &s, const uint8_t *loc) const { - // There are 4 different TLS variable models with varying degrees of - // flexibility and performance. LocalExec and InitialExec models are fast but - // less-flexible models. If they are in use, we set DF_STATIC_TLS flag in the - // dynamic section to let runtime know about that. - if (type == R_386_TLS_LE || type == R_386_TLS_LE_32 || type == R_386_TLS_IE || - type == R_386_TLS_GOTIE) + if (type == R_386_TLS_IE || type == R_386_TLS_GOTIE) config->hasStaticTlsModel = true; switch (type) {