Explorar el Código

Add _csu_abort function

Pierre Muller hace 1 año
padre
commit
eff8f956a1
Se han modificado 2 ficheros con 16 adiciones y 0 borrados
  1. 7 0
      rtl/openbsd/i386/si_c.inc
  2. 9 0
      rtl/openbsd/x86_64/si_c.inc

+ 7 - 0
rtl/openbsd/i386/si_c.inc

@@ -39,6 +39,13 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
 
 function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
+procedure _csu_abort; cdecl; external name '_csu_abort';
+begin
+  asm
+    int3
+ 	end;
+end;
+
 procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
   var
     I: SizeUInt;

+ 9 - 0
rtl/openbsd/x86_64/si_c.inc

@@ -36,6 +36,15 @@ procedure _FPC_proc_start; assembler; nostackframe; public name '_start'; public
 
 function _strrchr(str: PAnsiChar; character: LongInt): PAnsiChar; forward;
 
+procedure _csu_abort; cdecl; public name '_csu_abort';
+begin
+  asm
+    // endbr64
+    // Not yet supported by our inline assembler reader
+    int3
+  end;
+end;
+
 procedure _FPC_proc___start(argc: LongInt; argv: PPAnsiChar; envp: Pointer; cleanup: TCdeclProcedure); cdecl;
   var
     I: SizeUInt;