Skip to content

Commit 5dafc66

Browse files
committed
Fix bug.
1 parent 20b544c commit 5dafc66

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
@@ -1387,7 +1387,8 @@ unsigned RelocationScanner::handleTlsRelocation(RelExpr expr, RelType type,
13871387
// optimization as well.
13881388
bool execOptimize =
13891389
!ctx.arg.shared && ctx.arg.emachine != EM_ARM &&
1390-
ctx.arg.emachine != EM_HEXAGON && execOptimizeInLoongArch &&
1390+
ctx.arg.emachine != EM_HEXAGON &&
1391+
(ctx.arg.emachine != EM_LOONGARCH || execOptimizeInLoongArch) &&
13911392
!(isRISCV && expr != R_TLSDESC_PC && expr != R_TLSDESC_CALL) &&
13921393
!sec->file->ppc64DisableTLSRelax;
13931394

0 commit comments

Comments
 (0)