Skip to content

Commit 371290d

Browse files
committed
[ELF] Remove unneeded DF_STATIC_TLS for EM_386 local-exec TLS
which is also untested.
1 parent 25d1734 commit 371290d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lld/ELF/Arch/X86.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ int X86::getTlsGdRelaxSkip(RelType type) const {
7878

7979
RelExpr X86::getRelExpr(RelType type, const Symbol &s,
8080
const uint8_t *loc) const {
81-
// There are 4 different TLS variable models with varying degrees of
82-
// flexibility and performance. LocalExec and InitialExec models are fast but
83-
// less-flexible models. If they are in use, we set DF_STATIC_TLS flag in the
84-
// dynamic section to let runtime know about that.
85-
if (type == R_386_TLS_LE || type == R_386_TLS_LE_32 || type == R_386_TLS_IE ||
86-
type == R_386_TLS_GOTIE)
81+
if (type == R_386_TLS_IE || type == R_386_TLS_GOTIE)
8782
config->hasStaticTlsModel = true;
8883

8984
switch (type) {

0 commit comments

Comments
 (0)