Browse Source

* use own dummy for _init and _fini

peter 24 years ago
parent
commit
602e2fb40d
2 changed files with 18 additions and 6 deletions
  1. 9 3
      rtl/linux/i386/cprt21.as
  2. 9 3
      rtl/linux/i386/gprt21.as

+ 9 - 3
rtl/linux/i386/cprt21.as

@@ -40,8 +40,8 @@ _start:
         pushl   %edi
         pushl   %esp
         pushl   %edx
-        pushl   $_fini
-        pushl   $_init
+        pushl   $_fini_dummy
+        pushl   $_init_dummy
         pushl   %ebx
         pushl   %esi
         pushl   $main
@@ -60,6 +60,7 @@ main:
         /* start the program */
         xorl    %ebp,%ebp
         call    PASCALMAIN
+        hlt
 
         .globl _haltproc
         .type _haltproc,@function
@@ -71,6 +72,8 @@ _haltproc:
         movl    ___fpc_ret_ebp,%ebp
         movl    ___fpc_ret_ebx,%ebx
         push    %edx
+_init_dummy:
+_fini_dummy:
         ret
 
 .data
@@ -92,7 +95,10 @@ ___fpc_ret_ebp:
 
 #
 # $Log$
-# Revision 1.3  2001-02-14 22:36:21  sg
+# Revision 1.4  2001-06-04 18:05:47  peter
+#   * use own dummy for _init and _fini
+#
+# Revision 1.3  2001/02/14 22:36:21  sg
 # * Merged Pierre's fix for my problem with heaptrace unit (by setting EBP
 #   to zero before calling PASCALMAIN)
 #

+ 9 - 3
rtl/linux/i386/gprt21.as

@@ -41,8 +41,8 @@ _start:
         pushl   %eax
         pushl   %esp
         pushl   %edx
-        pushl   $_fini
-        pushl   $_init
+        pushl   $_fini_dummy
+        pushl   $_init_dummy
         pushl   %ebx
         pushl   %esi
         pushl   $main
@@ -63,6 +63,7 @@ cmain:
 
         /* start the program */
         call    PASCALMAIN
+        hlt
 
         .globl _haltproc
         .type _haltproc,@function
@@ -75,6 +76,8 @@ _haltproc:
         movl    ___fpc_ret_esi,%esi
         movl    ___fpc_ret_edi,%edi
         push    %edx
+_init_dummy:
+_fini_dummy:
         ret
 
         .globl  __gmon_start__
@@ -122,7 +125,10 @@ ___fpc_ret_edi:
 
 #
 # $Log$
-# Revision 1.2  2000-10-15 09:09:23  peter
+# Revision 1.3  2001-06-04 18:05:47  peter
+#   * use own dummy for _init and _fini
+#
+# Revision 1.2  2000/10/15 09:09:23  peter
 #   * startup code also needed syslinux->system updates
 #
 # Revision 1.1  2000/07/13 06:30:55  michael