瀏覽代碼

* More dummy code to avoid removal of required labels

git-svn-id: trunk@17898 -
pierre 14 年之前
父節點
當前提交
46a6be05a5
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 4 1
      rtl/win32/system.pp
  2. 4 1
      rtl/win64/system.pp

+ 4 - 1
rtl/win32/system.pp

@@ -994,8 +994,11 @@ begin
   DispCallByIDProc:=@DoDispCallByIDError;
 {$ifdef FPC_USE_TLS_DIRECTORY}
   { This code is only here to force
-    incorporation of _tls_used record in executable
+    incorporation of needed labels for
+    _tls_used record in executable
     when smartlinking is on }
+  _tls_used.Index_pointer:=@FreePascal_TLS_callback;
+  _tls_used.Index_pointer:=@FreePascal_end_of_TLS_callback;
   _tls_used.Index_pointer:=@tls_index;
 {$endif FPC_USE_TLS_DIRECTORY}
 end.

+ 4 - 1
rtl/win64/system.pp

@@ -985,8 +985,11 @@ begin
   DispCallByIDProc:=@DoDispCallByIDError;
 {$ifdef FPC_USE_TLS_DIRECTORY}
   { This code is only here to force
-    incorporation of _tls_used record in executable
+    incorporation of needed labels for
+    _tls_used record in executable
     when smartlinking is on }
+  _tls_used.Index_pointer:=@FreePascal_TLS_callback;
+  _tls_used.Index_pointer:=@FreePascal_end_of_TLS_callback;
   _tls_used.Index_pointer:=@tls_index;
 {$endif FPC_USE_TLS_DIRECTORY}
 end.