Browse Source

Fix si_g.inc for x86_64-linux:
* it's 'atexit' and not '__libc_atexit'
* initialstkptr is a global symbol so it needs to be loaded using GOTPCREL

git-svn-id: trunk@34235 -

svenbarth 9 years ago
parent
commit
7f5352280d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rtl/linux/x86_64/si_g.inc

+ 2 - 2
rtl/linux/x86_64/si_g.inc

@@ -44,7 +44,7 @@ var
 
 
   fpc_ret,fpc_ret_rbp : pointer;
   fpc_ret,fpc_ret_rbp : pointer;
 
 
-procedure libc_atexit; external name '__libc_atexit';
+procedure libc_atexit; external name 'atexit';
 procedure libc_exit; external name '__libc_exit';
 procedure libc_exit; external name '__libc_exit';
 procedure libc_init; external name '__libc_init';
 procedure libc_init; external name '__libc_init';
 procedure libc_setfpucw; external name '__setfpucw';
 procedure libc_setfpucw; external name '__setfpucw';
@@ -155,7 +155,7 @@ procedure main_stub; assembler; nostackframe;
     movq    gmon_mcleanup@GOTPCREL(%rip),%rdi
     movq    gmon_mcleanup@GOTPCREL(%rip),%rdi
     call    libc_atexit@PLT
     call    libc_atexit@PLT
     { Save initial stackpointer }
     { Save initial stackpointer }
-    movq    initialstkptr(%rip),%rax
+    movq    initialstkptr@GOTPCREL(%rip),%rax
     movq    %rsp,(%rax)
     movq    %rsp,(%rax)
 
 
     { start the program }
     { start the program }