fpc/rtl/linux/si_c21g.pp
sergei 77285b63eb * i386-linux: reworked and cleaned up libc-related startup code:
* Don't replace intended initialization routines with dummy ones, so libc can properly initialize itself.
  * Profiling support (si_c21g.pp) only needs to contain the __gmon_start__ procedure, so it can reuse the entire si_c21.inc, and separate si_21g.inc file is no longer needed.

git-svn-id: trunk@32984 -
2016-01-22 17:11:08 +00:00

47 lines
1.1 KiB
ObjectPascal

{
This file is part of the Free Pascal run time library.
Copyright (c) 2005 by Michael Van Canneyt, Peter Vreman,
& Daniel Mantione, members of the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
unit si_c21g;
interface
{$i si_intf.inc}
implementation
{$i sysnr.inc}
{$i si_c21.inc}
var
gmon_started: boolean;
gmon_start : record end;external name 'PASCALMAIN';
gmon_etext : record end;external name '_etext';
procedure atexit(p: pointer); cdecl; external;
procedure monstartup (main,etext : pointer); cdecl; external;
procedure _mcleanup; cdecl; external;
procedure __gmon_start__; cdecl; public;
begin
if not gmon_started then
begin
gmon_started:=true;
monstartup(@gmon_start,@gmon_etext);
atexit(@_mcleanup);
end;
end;
end.