diff --git a/compiler/systems/t_wasi.pas b/compiler/systems/t_wasi.pas
index 1d2daff579..163c13795d 100644
--- a/compiler/systems/t_wasi.pas
+++ b/compiler/systems/t_wasi.pas
@@ -332,6 +332,12 @@ begin
 
   LinkScript.Concat('EXESECTION .wasm_globals');
   LinkScript.Concat('  SYMBOL __stack_pointer');
+  if ts_wasm_threads in current_settings.targetswitches then
+    begin
+      LinkScript.Concat('  SYMBOL __tls_base');
+      LinkScript.Concat('  SYMBOL __tls_size');
+      LinkScript.Concat('  SYMBOL __tls_align');
+    end;
   LinkScript.Concat('  OBJSECTION .wasm_globals.*');
   LinkScript.Concat('ENDEXESECTION');