Merged revisions 2321-2322 via svnmerge from

http://peter@svn.freepascal.org/svn/fpc/trunk

........
r2321 | peter | 2006-01-22 12:16:15 +0100 (Sun, 22 Jan 2006) | 2 lines

  * fix order of libraries for -pg

........
r2322 | peter | 2006-01-22 12:23:41 +0100 (Sun, 22 Jan 2006) | 2 lines

  * gprof fixes

........

git-svn-id: branches/fixes_2_0@2332 -
This commit is contained in:
peter 2006-01-24 06:49:56 +00:00
parent b990e72c60
commit 979ef33de2

View File

@ -20,18 +20,37 @@ _start:
_cmain:
subl $0x8,%esp
andl $0xfffffff0,%esp
pushl etext
pushl __image_base__
call _monstartup
call __gmon_start__
call ___main
movl %esp,__stkptr
call _FPC_EXE_Entry
ret
.globl __gmon_start__
__gmon_start__:
pushl %ebp
movl __monstarted,%eax
leal 0x1(%eax),%edx
movl %esp,%ebp
movl %edx,__monstarted
testl %eax,%eax
jnz .Lnomonstart
pushl $etext /* Initialize gmon */
pushl $_cmain
call _monstartup
addl $8,%esp
.Lnomonstart:
movl %ebp,%esp
popl %ebp
ret
.globl asm_exit
asm_exit:
pushl %eax
call __mcleanup
popl %eax
pushl %eax
call __mcleanup
popl %eax
pushl %eax
call exitprocess
@ -73,3 +92,7 @@ exitprocess:
.section .idata$7
.L6:
.ascii "kernel32.dll\000"
.bss
.lcomm __monstarted,4
.comm __stkptr,4