Browse Source

Use new GetExceptionPointer nostackframe assembler function to avoid 32bit relocation on .bss problem

git-svn-id: trunk@24221 -
pierre 12 years ago
parent
commit
3ab1762d92
1 changed files with 6 additions and 8 deletions
  1. 6 8
      rtl/win64/system.pp

+ 6 - 8
rtl/win64/system.pp

@@ -604,15 +604,13 @@ function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
   end;
 
 
-var
-  st : Pointer;
+function GetExceptionPointer : Pointer; assembler;nostackframe;
+asm
+  movq %gs:(8),%rax
+end;
 
 begin
-  asm
-    movq %gs:(8),%rax
-    movq %rax,st
-  end;
-  StackTop:=st;
+  StackTop:=GetExceptionPointer;
   { pass dummy value }
   StackLength := CheckInitialStkLen($1000000);
   StackBottom := StackTop - StackLength;
@@ -628,7 +626,7 @@ begin
   begin
     InitHeap;
     InitSystemThreads;
-  end;  
+  end;
   SysInitExceptions;
   initwidestringmanager;
   initunicodestringmanager;