mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 11:59:12 +02:00
* some more use of __libc_csu_* removed
This commit is contained in:
parent
a01dc28206
commit
cb2704dfb2
@ -35,12 +35,13 @@
|
||||
|
||||
{$asmmode att}
|
||||
|
||||
procedure __libc_csu_init; cdecl; external;
|
||||
procedure __libc_csu_fini; cdecl; external;
|
||||
procedure ini_dummy;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure libc_start_main; external name '__libc_start_main';
|
||||
procedure libc_exit(code: longint); cdecl; external name 'exit';
|
||||
|
||||
|
||||
{******************************************************************************
|
||||
glibc 2.1 lib + profiling start/halt
|
||||
******************************************************************************}
|
||||
@ -93,8 +94,8 @@ asm
|
||||
pushl %esp { stack_end }
|
||||
pushl %edx { function to be registered with
|
||||
atexit(), passed by loader }
|
||||
pushl $__libc_csu_fini
|
||||
pushl $__libc_csu_init
|
||||
pushl $ini_dummy
|
||||
pushl $ini_dummy
|
||||
pushl %esi { Push second argument: argv. }
|
||||
pushl %ecx { Push first argument: argc. }
|
||||
|
||||
|
@ -18,10 +18,9 @@
|
||||
var
|
||||
BSS_START: record end; external name '__bss_start';
|
||||
|
||||
{ as we do not call these procedures directly, calling conventions do not matter and
|
||||
even if we did, we use c calling conventions anyways }
|
||||
procedure __libc_csu_init; external name '__libc_csu_init';
|
||||
procedure __libc_csu_fini; external name '__libc_csu_fini';
|
||||
procedure ini_dummy;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure libc_start_main(main: TProcedure; argc: ptruint; argv: ppchar; init, fini, rtld_fini: TProcedure; stack_end: pointer); cdecl; external name '__libc_start_main';
|
||||
procedure libc_exit(code: ptruint); cdecl; external name 'exit';
|
||||
@ -39,7 +38,7 @@ procedure _FPC_rv_enter(at_exit: TProcedure; sp: pptruint);
|
||||
operatingsystem_parameter_argv:=argv;
|
||||
operatingsystem_parameter_envp:=@sp[argc+2];
|
||||
|
||||
libc_start_main(@PascalMain, argc, argv, @__libc_csu_init, @__libc_csu_fini, at_exit, sp);
|
||||
libc_start_main(@PascalMain, argc, argv, @ini_dummy, @ini_dummy, at_exit, sp);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -21,10 +21,9 @@ var
|
||||
BSS_START: record end; external name '__bss_start';
|
||||
_etext: pointer; external name '_etext';
|
||||
|
||||
{ as we do not call these procedures directly, calling conventions do not matter and
|
||||
even if we did, we use c calling conventions anyways }
|
||||
procedure __libc_csu_init; external name '__libc_csu_init';
|
||||
procedure __libc_csu_fini; external name '__libc_csu_fini';
|
||||
procedure ini_dummy;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure libc_start_main(main: TProcedure; argc: ptruint; argv: ppchar; init, fini, rtld_fini: TProcedure; stack_end: pointer); cdecl; external name '__libc_start_main';
|
||||
procedure libc_exit(code: ptruint); cdecl; external name 'exit';
|
||||
@ -49,7 +48,7 @@ procedure _FPC_rv_enter(at_exit: TProcedure; sp: pptruint);
|
||||
monstartup(@_FPC_rv_enter,@_etext);
|
||||
atexit(@_mcleanup);
|
||||
|
||||
libc_start_main(@PascalMain, argc, argv, @__libc_csu_init, @__libc_csu_fini, at_exit, sp);
|
||||
libc_start_main(@PascalMain, argc, argv, @ini_dummy, @ini_dummy, at_exit, sp);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user