[syslinux:elflink] exit: Delete exit.S and references to __exit_handler

syslinux-bot for Matt Fleming matt.fleming at linux.intel.com
Wed Apr 27 14:30:48 PDT 2011


Commit-ID:  90d5044ba28432921ca1f9ce393e9e8771d20274
Gitweb:     http://syslinux.zytor.com/commit/90d5044ba28432921ca1f9ce393e9e8771d20274
Author:     Matt Fleming <matt.fleming at linux.intel.com>
AuthorDate: Tue, 12 Apr 2011 22:24:36 +0100
Committer:  Matt Fleming <matt.fleming at linux.intel.com>
CommitDate: Tue, 26 Apr 2011 09:53:08 +0100

exit: Delete exit.S and references to __exit_handler

We stopped using exit.S (and thus __exit_handler) in 71d5d1ba646e
("elflink: change the exit.c, remove the exit.S to make process exit
working") when we moved to using the C version of _exit(). If we don't
remove the symbol __exit_handler we'll encounter undefined symbol
errors when moving libcom32.a over to an ELF shared library.

Signed-off-by: Matt Fleming <matt.fleming at linux.intel.com>


---
 com32/lib/onexit.c   |    3 ---
 com32/lib/sys/exit.S |   41 -----------------------------------------
 2 files changed, 0 insertions(+), 44 deletions(-)

diff --git a/com32/lib/onexit.c b/com32/lib/onexit.c
index d409e82..272f8f1 100644
--- a/com32/lib/onexit.c
+++ b/com32/lib/onexit.c
@@ -6,7 +6,6 @@
 #include <unistd.h>
 #include "atexit.h"
 
-extern __noreturn(*__exit_handler) (int);
 static struct atexit *__atexit_list;
 
 static __noreturn on_exit_exit(int rv)
@@ -33,7 +32,5 @@ int on_exit(void (*fctn) (int, void *), void *arg)
     as->next = __atexit_list;
     __atexit_list = as;
 
-    __exit_handler = on_exit_exit;
-
     return 0;
 }
diff --git a/com32/lib/sys/exit.S b/com32/lib/sys/exit.S
deleted file mode 100644
index 2ab8012..0000000
--- a/com32/lib/sys/exit.S
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Implementation of _exit() for com32 based on c32entry.S
- */
-	.text
-
-	.globl _Exit
-	.type _Exit, @function
-_Exit:
-	/* Just fall through to _exit */
-	.size _Exit, .-_Exit
-
-	.globl _exit
-	.type _exit, @function
-_exit:
-#ifdef REGPARM
-	pushl %eax
-#endif
-
-	/* Run any destructors */
-	movl $__dtors_start, %esi
-2:
-	cmpl $__dtors_end, %esi
-	jae 1f
-	call *(%esi)
-	addl $4,%esi
-	jmp 2b
-
-1:
-#ifdef REGPARM
-	popl %eax
-#else
-	movl 4(%esp),%eax		# Exit code in %eax = return value
-#endif
-	movl (__entry_esp),%esp		# Return stack pointer to entry value
-	ret				# Return to termination address
-	.size _exit, .-_exit
-
-	.data
-__exit_handler:
-	.globl __exit_handler
-	.long _exit



More information about the Syslinux-commits mailing list