Browse Source

* 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 -

sergei 11 years ago
parent
commit
da019b889c
1 changed files with 4 additions and 19 deletions
  1. 4 19
      rtl/freebsd/i386/dllprt0.as

+ 4 - 19
rtl/freebsd/i386/dllprt0.as

@@ -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
+