Skip to content

Commit 31a9dab

Browse files
committed
Fix bug.
1 parent 81d44f2 commit 31a9dab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lld/ELF/Relocations.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,8 @@ unsigned RelocationScanner::handleTlsRelocation(RelExpr expr, RelType type,
13551355
// optimization as well.
13561356
bool execOptimize =
13571357
!ctx.arg.shared && ctx.arg.emachine != EM_ARM &&
1358-
ctx.arg.emachine != EM_HEXAGON && execOptimizeInLoongArch &&
1358+
ctx.arg.emachine != EM_HEXAGON &&
1359+
(ctx.arg.emachine != EM_LOONGARCH || execOptimizeInLoongArch) &&
13591360
!(isRISCV && expr != R_TLSDESC_PC && expr != R_TLSDESC_CALL) &&
13601361
!sec->file->ppc64DisableTLSRelax;
13611362

0 commit comments

Comments
 (0)