Przeglądaj źródła

+ Add CPREFIX macro to allow transition from '_' prefix to ''

git-svn-id: trunk@20287 -
pierre 13 lat temu
rodzic
commit
6cd1c2a60c
1 zmienionych plików z 17 dodań i 6 usunięć
  1. 17 6
      rtl/netbsd/i386/prt0.as

+ 17 - 6
rtl/netbsd/i386/prt0.as

@@ -40,7 +40,11 @@ __progname:
 __ps_strings:
 	.long 0
 	.align 4
+.ifdef CPREFIX
 ___fpucw:
+.else
+__fpucw:
+.endif
         .long   0x1332
 
         .globl  ___fpc_brk_addr         /* heap management */
@@ -131,12 +135,19 @@ ___start:
 
         finit                           /* initialize fpu */
         fwait
+ .ifdef CPREFIX
         fldcw   ___fpucw
-
+ .else
+        fldcw   __fpucw
+ .endif
         xorl    %ebp,%ebp
 
+.ifdef CPREFIX
 	call _main
-	pushl %eax
+.else
+	call main
+.endif
+pushl %eax
 	jmp  _haltproc
 
 .p2align 2,0x90
@@ -175,8 +186,8 @@ _actualsyscall:
 .ascii "NetBSD\0\0"
 .long 199905
 
-        .comm environ,4
-        .comm operatingsystem_parameter_envp,4
-        .comm operatingsystem_parameter_argc,4
-        .comm operatingsystem_parameter_argv,4
+        .comm environ,4,4
+        .comm operatingsystem_parameter_envp,4,4
+        .comm operatingsystem_parameter_argc,4,4
+        .comm operatingsystem_parameter_argv,4,4