Browse Source

* @PLT is needed for calls to link it properly with pic code

git-svn-id: trunk@46209 -
florian 5 years ago
parent
commit
b60ac4c2db
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rtl/linux/x86_64/si_c.inc

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

@@ -86,7 +86,7 @@ procedure main_stub; assembler; nostackframe;
 
 
     { start the program }
     { start the program }
     xorq    %rbp,%rbp
     xorq    %rbp,%rbp
-    call    PASCALMAIN
+    call    PASCALMAIN@PLT
 {$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
 {$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
     hlt
     hlt
   end;
   end;
@@ -162,7 +162,7 @@ procedure _FPC_libc_start; assembler; nostackframe; public name '_start';
 
 
     { Call the user's main function, and exit with its value.
     { Call the user's main function, and exit with its value.
      But let the libc call main.    }
      But let the libc call main.    }
-    call libc_start_main
+    call libc_start_main@PLT
 
 
     hlt                     { Crash if somehow `exit' does return.  }
     hlt                     { Crash if somehow `exit' does return.  }
   end;
   end;