This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Use abort instead of _exi in dl-irel.h


While debugging linker, _exit (-1) isn't as useful as abort ().  This
patch changes it to abort ().

BTW, I have checked the final linker patch into the FSF binutils and
I will make a new Linux binutils release today. I will submit a few
glibc testcases.


H.J.
---
2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/i386/dl-irel.h: Use abort instead of _exit.
	* sysdeps/x86_64/dl-irel.h: Likewise.

diff --git a/sysdeps/i386/dl-irel.h b/sysdeps/i386/dl-irel.h
index 4acb862..817bc4a 100644
--- a/sysdeps/i386/dl-irel.h
+++ b/sysdeps/i386/dl-irel.h
@@ -21,7 +21,7 @@
 #ifndef _DL_IREL_H
 #define _DL_IREL_H
 
-#include <unistd.h>
+#include <stdlib.h>
 
 #define ELF_MACHINE_IREL	1
 
@@ -38,7 +38,7 @@ elf_irel (const Elf32_Rel *reloc)
       *reloc_addr = value;
     }
   else
-    _exit (-1);
+    abort ();
 }
 
 #endif /* dl-irel.h */
diff --git a/sysdeps/x86_64/dl-irel.h b/sysdeps/x86_64/dl-irel.h
index 442ab71..6832f7e 100644
--- a/sysdeps/x86_64/dl-irel.h
+++ b/sysdeps/x86_64/dl-irel.h
@@ -21,7 +21,7 @@
 #ifndef _DL_IREL_H
 #define _DL_IREL_H
 
-#include <unistd.h>
+#include <stdlib.h>
 
 #define ELF_MACHINE_IRELA	1
 
@@ -38,7 +38,7 @@ elf_irela (const Elf64_Rela *reloc)
       *reloc_addr = value;
     }
   else
-    _exit (-1);
+    abort ();
 }
 
 #endif /* dl-irel.h */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]