From 02beefe984ca176ed5b8d6c58257fba026c509cd Mon Sep 17 00:00:00 2001
From: Eric Andersen <andersen@codepoet.org>
Date: Fri, 27 Apr 2001 19:27:16 +0000
Subject: Eliminate the useless _dl_interpreter_exit function

---
 ldso/ldso/boot1.c          | 7 -------
 ldso/ldso/i386/dl-sysdep.h | 7 +++----
 ldso/ldso/i386/ld_sysdep.h | 7 +++----
 ldso/ldso/i386/sysdep.h    | 7 +++----
 ldso/ldso/ld-uClibc.c      | 7 -------
 ldso/ldso/ldso.c           | 7 -------
 6 files changed, 9 insertions(+), 33 deletions(-)

(limited to 'ldso')

diff --git a/ldso/ldso/boot1.c b/ldso/ldso/boot1.c
index dd66b51b2..3b613fb87 100644
--- a/ldso/ldso/boot1.c
+++ b/ldso/ldso/boot1.c
@@ -151,7 +151,6 @@ unsigned int * _dl_envp;
   RESULT = hash; \
 }
 extern int _dl_linux_resolve(void);
-extern int _dl_interpreter_exit(int);
 extern char * _dl_strdup(const char *);
 extern char * _dl_getenv(char * symbol, char ** envp);
 extern void _dl_unsetenv(char * symbol, char ** envp);
@@ -997,9 +996,3 @@ char * _dl_strdup(const char * string){
   return retval;
 }
 
-/* In principle we could do the .fini stuff here, but we already
-   registered this stuff with atexit */
-int _dl_interpreter_exit(int exitcode){
-/*  _dl_fdprintf(2, "Hey, look where I am!\n"); */
-  return 0;
-}
diff --git a/ldso/ldso/i386/dl-sysdep.h b/ldso/ldso/i386/dl-sysdep.h
index bf3d43be6..2011049b1 100644
--- a/ldso/ldso/i386/dl-sysdep.h
+++ b/ldso/ldso/i386/dl-sysdep.h
@@ -58,14 +58,13 @@
 
 /*
  * Transfer control to the user's application, once the dynamic loader
- * is done.
+ * is done.  This routine has to exit the current function, then 
+ * call the _dl_elf_main function.
  */
-
 #define START()		\
 	__asm__ volatile ("leave\n\t" \
 		    "jmp *%%eax\n\t"	\
-		    : "=a" (status) :	\
-		    "d" (_dl_interpreter_exit), "a" (_dl_elf_main))
+		    : "=a" (status) :	"a" (_dl_elf_main))
 
 
 
diff --git a/ldso/ldso/i386/ld_sysdep.h b/ldso/ldso/i386/ld_sysdep.h
index bf3d43be6..2011049b1 100644
--- a/ldso/ldso/i386/ld_sysdep.h
+++ b/ldso/ldso/i386/ld_sysdep.h
@@ -58,14 +58,13 @@
 
 /*
  * Transfer control to the user's application, once the dynamic loader
- * is done.
+ * is done.  This routine has to exit the current function, then 
+ * call the _dl_elf_main function.
  */
-
 #define START()		\
 	__asm__ volatile ("leave\n\t" \
 		    "jmp *%%eax\n\t"	\
-		    : "=a" (status) :	\
-		    "d" (_dl_interpreter_exit), "a" (_dl_elf_main))
+		    : "=a" (status) :	"a" (_dl_elf_main))
 
 
 
diff --git a/ldso/ldso/i386/sysdep.h b/ldso/ldso/i386/sysdep.h
index bf3d43be6..2011049b1 100644
--- a/ldso/ldso/i386/sysdep.h
+++ b/ldso/ldso/i386/sysdep.h
@@ -58,14 +58,13 @@
 
 /*
  * Transfer control to the user's application, once the dynamic loader
- * is done.
+ * is done.  This routine has to exit the current function, then 
+ * call the _dl_elf_main function.
  */
-
 #define START()		\
 	__asm__ volatile ("leave\n\t" \
 		    "jmp *%%eax\n\t"	\
-		    : "=a" (status) :	\
-		    "d" (_dl_interpreter_exit), "a" (_dl_elf_main))
+		    : "=a" (status) :	"a" (_dl_elf_main))
 
 
 
diff --git a/ldso/ldso/ld-uClibc.c b/ldso/ldso/ld-uClibc.c
index dd66b51b2..3b613fb87 100644
--- a/ldso/ldso/ld-uClibc.c
+++ b/ldso/ldso/ld-uClibc.c
@@ -151,7 +151,6 @@ unsigned int * _dl_envp;
   RESULT = hash; \
 }
 extern int _dl_linux_resolve(void);
-extern int _dl_interpreter_exit(int);
 extern char * _dl_strdup(const char *);
 extern char * _dl_getenv(char * symbol, char ** envp);
 extern void _dl_unsetenv(char * symbol, char ** envp);
@@ -997,9 +996,3 @@ char * _dl_strdup(const char * string){
   return retval;
 }
 
-/* In principle we could do the .fini stuff here, but we already
-   registered this stuff with atexit */
-int _dl_interpreter_exit(int exitcode){
-/*  _dl_fdprintf(2, "Hey, look where I am!\n"); */
-  return 0;
-}
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index dd66b51b2..3b613fb87 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -151,7 +151,6 @@ unsigned int * _dl_envp;
   RESULT = hash; \
 }
 extern int _dl_linux_resolve(void);
-extern int _dl_interpreter_exit(int);
 extern char * _dl_strdup(const char *);
 extern char * _dl_getenv(char * symbol, char ** envp);
 extern void _dl_unsetenv(char * symbol, char ** envp);
@@ -997,9 +996,3 @@ char * _dl_strdup(const char * string){
   return retval;
 }
 
-/* In principle we could do the .fini stuff here, but we already
-   registered this stuff with atexit */
-int _dl_interpreter_exit(int exitcode){
-/*  _dl_fdprintf(2, "Hey, look where I am!\n"); */
-  return 0;
-}
-- 
cgit v1.2.3