mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-01 07:59:22 +02:00
* i386-freebsd shared library startup:
* Don't mess with FPU control word, libraries should leave it alone. * Don't call FPC_LIB_EXIT from haltproc, unit finalization is performed before haltproc. + non-executable stack marker. git-svn-id: trunk@26763 -
This commit is contained in:
parent
e65fd31b0b
commit
da019b889c
@ -37,12 +37,6 @@ gcc2_compiled.:
|
||||
.size __progname,4
|
||||
__progname:
|
||||
.long .LC0
|
||||
.align 4
|
||||
.type __fpucw,@object
|
||||
.size __fpucw,4
|
||||
.global __fpucw
|
||||
___fpucw:
|
||||
.long 0x1332
|
||||
|
||||
.globl ___fpc_brk_addr /* heap management */
|
||||
.type ___fpc_brk_addr,@object
|
||||
@ -56,27 +50,15 @@ FPC_LIB_START:
|
||||
.globl FPC_SHARED_LIB_START
|
||||
.type FPC_SHARED_LIB_START,@function
|
||||
FPC_SHARED_LIB_START:
|
||||
movb $1,operatingsystem_islibrary
|
||||
|
||||
finit /* initialize fpu */
|
||||
fwait
|
||||
fldcw ___fpucw
|
||||
|
||||
/* xorl %ebp,%ebp */
|
||||
|
||||
call PASCALMAIN@PLT
|
||||
ret
|
||||
|
||||
pushl %eax
|
||||
jmp _haltproc
|
||||
|
||||
.p2align 2,0x90
|
||||
.globl _haltproc
|
||||
.type _haltproc,@function
|
||||
|
||||
_haltproc:
|
||||
call FPC_LIB_EXIT@PLT
|
||||
mov $1,%eax
|
||||
mov $1,%eax
|
||||
movzwl operatingsystem_result,%ebx
|
||||
pushl %ebx
|
||||
call _actualsyscall
|
||||
@ -106,3 +88,6 @@ __stkptr:
|
||||
|
||||
//.section .threadvar,"aw",@nobits
|
||||
.comm ___fpc_threadvar_offset,4
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user