* properties fixed

git-svn-id: trunk@14155 -
This commit is contained in:
florian 2009-11-12 18:03:28 +00:00
parent 5bc3c1f53d
commit 517ac768f0
2 changed files with 111 additions and 111 deletions

2
.gitattributes vendored
View File

@ -7055,7 +7055,7 @@ rtl/solaris/errno.inc svneol=native#text/plain
rtl/solaris/errnostr.inc svneol=native#text/plain rtl/solaris/errnostr.inc svneol=native#text/plain
rtl/solaris/i386/sighnd.inc svneol=native#text/plain rtl/solaris/i386/sighnd.inc svneol=native#text/plain
rtl/solaris/i386/sighndh.inc svneol=native#text/plain rtl/solaris/i386/sighndh.inc svneol=native#text/plain
rtl/solaris/i386/start.inc -text svneol=unset#text/plain rtl/solaris/i386/start.inc svneol=native#text/plain
rtl/solaris/osdefs.inc svneol=native#text/plain rtl/solaris/osdefs.inc svneol=native#text/plain
rtl/solaris/osmacro.inc svneol=native#text/plain rtl/solaris/osmacro.inc svneol=native#text/plain
rtl/solaris/ostypes.inc svneol=native#text/plain rtl/solaris/ostypes.inc svneol=native#text/plain

View File

@ -1,110 +1,110 @@
{ {
This file is part of the Free Pascal run time library. This file is part of the Free Pascal run time library.
Copyright (c) 2009 by Pierre Muller, Copyright (c) 2009 by Pierre Muller,
member of the Free Pascal development team. member of the Free Pascal development team.
Program startup Program startup
Adapted from code generated by gcc on opensolaris 2.11 Adapted from code generated by gcc on opensolaris 2.11
and sparc version in and sparc version in
See the file COPYING.FPC, included in this distribution, See the file COPYING.FPC, included in this distribution,
for details about the copyright. for details about the copyright.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************} **********************************************************************}
type type
TCdeclProcedure = procedure; cdecl; TCdeclProcedure = procedure; cdecl;
function atexit(proc:TCdeclProcedure):longint;cdecl;external 'c' name 'atexit'{ @plt }; function atexit(proc:TCdeclProcedure):longint;cdecl;external 'c' name 'atexit'{ @plt };
procedure C_exit;cdecl;external 'c' name 'exit'; procedure C_exit;cdecl;external 'c' name 'exit';
procedure _exit;cdecl;external 'c' name '_exit'; procedure _exit;cdecl;external 'c' name '_exit';
//procedure _fini;cdecl;external 'c' name '_fini'; //procedure _fini;cdecl;external 'c' name '_fini';
//procedure __fpstart;cdecl;external 'c' name '__fpstart'{ @plt }; //procedure __fpstart;cdecl;external 'c' name '__fpstart'{ @plt };
//procedure __fsr;cdecl;external 'c' name '__fsr'; //procedure __fsr;cdecl;external 'c' name '__fsr';
//procedure _init;cdecl;external 'c' name '_init'; //procedure _init;cdecl;external 'c' name '_init';
procedure PascalMain;cdecl;external name 'PASCALMAIN'; procedure PascalMain;cdecl;external name 'PASCALMAIN';
{vars are not correctly transformed :( {vars are not correctly transformed :(
var var
_DYNAMIC : longint; cvar; external; _DYNAMIC : longint; cvar; external;
__Argv : pointer; cvar; external; __Argv : pointer; cvar; external;
environ : pointer; cvar; external; environ : pointer; cvar; external;
__get_exit_frame_monitor_ptr : pointer; cvar; external; __get_exit_frame_monitor_ptr : pointer; cvar; external;
__do_exit_code_ptr : pointer; cvar; external; __do_exit_code_ptr : pointer; cvar; external;
} }
var var
_environ : pointer; cvar; external; _environ : pointer; cvar; external;
procedure _DYNAMIC;cdecl;external 'c' name '_DYNAMIC'; { should be weak } procedure _DYNAMIC;cdecl;external 'c' name '_DYNAMIC'; { should be weak }
procedure __Argv;cdecl;external 'c' name '__Argv'; procedure __Argv;cdecl;external 'c' name '__Argv';
//procedure environ;cdecl;external 'c' name 'environ'; //procedure environ;cdecl;external 'c' name 'environ';
//procedure __get_exit_frame_monitor_ptr;cdecl;external 'c' name '__get_exit_frame_monitor_ptr'; //procedure __get_exit_frame_monitor_ptr;cdecl;external 'c' name '__get_exit_frame_monitor_ptr';
//procedure __do_exit_code_ptr;cdecl;external 'c' name '__do_exit_code_ptr'; //procedure __do_exit_code_ptr;cdecl;external 'c' name '__do_exit_code_ptr';
{ {
(top-gdb) disas _start (top-gdb) disas _start
Dump of assembler code for function _start: } Dump of assembler code for function _start: }
procedure _start;assembler;nostackframe;public name '_start'; procedure _start;assembler;nostackframe;public name '_start';
asm asm
pushl $0x0 pushl $0x0
pushl $0x0 pushl $0x0
mov %esp,%ebp mov %esp,%ebp
mov $_DYNAMIC,%eax mov $_DYNAMIC,%eax
test %eax,%eax test %eax,%eax
je .Label1 je .Label1
push %edx push %edx
call atexit {@plt} call atexit {@plt}
add $0x4,%esp add $0x4,%esp
.Label1: .Label1:
(* (*
push _fini push _fini
call atexit {@plt} call atexit {@plt}
add $0x4,%esp add $0x4,%esp
lea __get_exit_frame_monitor_ptr,%eax lea __get_exit_frame_monitor_ptr,%eax
mov (%eax),%eax mov (%eax),%eax
test %eax,%eax test %eax,%eax
je .Label2 je .Label2
lea __do_exit_code_ptr,%eax lea __do_exit_code_ptr,%eax
mov (%eax),%eax mov (%eax),%eax
test %eax,%eax test %eax,%eax
je .Label2 je .Label2
push %eax push %eax
call atexit {@plt} call atexit {@plt}
add $0x4,%esp add $0x4,%esp
*) *)
.Label2: .Label2:
mov 0x8(%ebp),%eax mov 0x8(%ebp),%eax
mov %eax,argc mov %eax,argc
mov _environ,%edx mov _environ,%edx
test %edx,%edx test %edx,%edx
jne .Label3 jne .Label3
lea 0x10(%ebp,%eax,4),%edx lea 0x10(%ebp,%eax,4),%edx
.Label3: .Label3:
movl %edx,_environ movl %edx,_environ
movl %edx,envp movl %edx,envp
and $0xfffffff0,%esp and $0xfffffff0,%esp
push %edx push %edx
lea 0xc(%ebp),%edx lea 0xc(%ebp),%edx
mov %edx,argv mov %edx,argv
push %edx push %edx
push %eax push %eax
//call __fpstart {@plt} //call __fpstart {@plt}
//call __fsr //call __fsr
//call _init //call _init
call PASCALMAIN {was <main> } call PASCALMAIN {was <main> }
add $0xc,%esp add $0xc,%esp
push %eax push %eax
push %eax push %eax
call C_exit { was exit@plt } call C_exit { was exit@plt }
add $0x4,%esp add $0x4,%esp
call _exit {@plt} call _exit {@plt}
add $0x4,%esp add $0x4,%esp
hlt hlt
end; end;