[git commit] ldso: merge duplicate dl-syscalls.h code to common header

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Oct 6 20:34:36 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=e2f889a7467979f56de6412e6cb1bdfaf797f677
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 ldso/include/dl-syscall.h          |    7 +++++++
 ldso/ldso/arm/dl-syscalls.h        |    6 ------
 ldso/ldso/avr32/dl-syscalls.h      |    7 +------
 ldso/ldso/bfin/dl-syscalls.h       |    6 ------
 ldso/ldso/c6x/dl-syscalls.h        |    8 --------
 ldso/ldso/cris/dl-syscalls.h       |    7 +------
 ldso/ldso/frv/dl-syscalls.h        |    6 ------
 ldso/ldso/i386/dl-syscalls.h       |    7 +------
 ldso/ldso/m68k/dl-syscalls.h       |    7 +------
 ldso/ldso/microblaze/dl-syscalls.h |    7 +------
 ldso/ldso/mips/dl-syscalls.h       |    7 +------
 ldso/ldso/powerpc/dl-syscalls.h    |    7 +------
 ldso/ldso/sh/dl-syscalls.h         |    7 -------
 ldso/ldso/sh64/dl-syscalls.h       |    7 -------
 ldso/ldso/sparc/dl-syscalls.h      |    7 +------
 ldso/ldso/x86_64/dl-syscalls.h     |    7 +------
 ldso/ldso/xtensa/dl-syscalls.h     |    8 +-------
 17 files changed, 17 insertions(+), 101 deletions(-)

diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index da3ac7f..7539c22 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -8,6 +8,13 @@
 #ifndef _LD_SYSCALL_H_
 #define _LD_SYSCALL_H_
 
+/* We can't use the real errno in ldso, since it has not yet
+ * been dynamicly linked in yet. */
+#include "sys/syscall.h"
+extern int _dl_errno;
+#undef __set_errno
+#define __set_errno(X) {(_dl_errno) = (X);}
+
 /* Pull in the arch specific syscall implementation */
 #include <dl-syscalls.h>
 /*  For MAP_ANONYMOUS -- differs between platforms */
diff --git a/ldso/ldso/arm/dl-syscalls.h b/ldso/ldso/arm/dl-syscalls.h
index 1c0e669..195461f 100644
--- a/ldso/ldso/arm/dl-syscalls.h
+++ b/ldso/ldso/arm/dl-syscalls.h
@@ -1,9 +1,3 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
 /* _call_via_rX calls are used in thumb ldso because of calls via
  * function pointers, but ldso is not linked with anything which
  * provides them, so define them here (only required for thumb).
diff --git a/ldso/ldso/avr32/dl-syscalls.h b/ldso/ldso/avr32/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/avr32/dl-syscalls.h
+++ b/ldso/ldso/avr32/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/bfin/dl-syscalls.h b/ldso/ldso/bfin/dl-syscalls.h
index f74cf1a..a119c74 100644
--- a/ldso/ldso/bfin/dl-syscalls.h
+++ b/ldso/ldso/bfin/dl-syscalls.h
@@ -18,12 +18,6 @@ License along with uClibc; see the file COPYING.LIB.  If not, write to
 the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
 USA.  */
 
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
 #include <sys/mman.h>
 
 /* The code below is extracted from libc/sysdeps/linux/frv/_mmap.c */
diff --git a/ldso/ldso/c6x/dl-syscalls.h b/ldso/ldso/c6x/dl-syscalls.h
index 9ff3358..66d96ab 100644
--- a/ldso/ldso/c6x/dl-syscalls.h
+++ b/ldso/ldso/c6x/dl-syscalls.h
@@ -4,14 +4,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
-#include <sys/mman.h>
-
 #ifdef __NR_pread64
 #define __NR___syscall_pread __NR_pread64
 static __always_inline _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
diff --git a/ldso/ldso/cris/dl-syscalls.h b/ldso/ldso/cris/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/cris/dl-syscalls.h
+++ b/ldso/ldso/cris/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/frv/dl-syscalls.h b/ldso/ldso/frv/dl-syscalls.h
index a4bff1d..13b887b 100644
--- a/ldso/ldso/frv/dl-syscalls.h
+++ b/ldso/ldso/frv/dl-syscalls.h
@@ -4,12 +4,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
 #include <sys/mman.h>
 
 /* The code below is extracted from libc/sysdeps/linux/frv/_mmap.c */
diff --git a/ldso/ldso/i386/dl-syscalls.h b/ldso/ldso/i386/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/i386/dl-syscalls.h
+++ b/ldso/ldso/i386/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/m68k/dl-syscalls.h b/ldso/ldso/m68k/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/m68k/dl-syscalls.h
+++ b/ldso/ldso/m68k/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/microblaze/dl-syscalls.h b/ldso/ldso/microblaze/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/microblaze/dl-syscalls.h
+++ b/ldso/ldso/microblaze/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/mips/dl-syscalls.h b/ldso/ldso/mips/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/mips/dl-syscalls.h
+++ b/ldso/ldso/mips/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/powerpc/dl-syscalls.h b/ldso/ldso/powerpc/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/powerpc/dl-syscalls.h
+++ b/ldso/ldso/powerpc/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/sh/dl-syscalls.h b/ldso/ldso/sh/dl-syscalls.h
index 712852c..f9f13c7 100644
--- a/ldso/ldso/sh/dl-syscalls.h
+++ b/ldso/ldso/sh/dl-syscalls.h
@@ -1,10 +1,3 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
-
 #if __GNUC_PREREQ (4, 1)
 #warning !!! gcc 4.1 and later have problems with __always_inline so redefined as inline
 # ifdef __always_inline
diff --git a/ldso/ldso/sh64/dl-syscalls.h b/ldso/ldso/sh64/dl-syscalls.h
index 4fe50fa..2ea4bb7 100644
--- a/ldso/ldso/sh64/dl-syscalls.h
+++ b/ldso/ldso/sh64/dl-syscalls.h
@@ -1,10 +1,3 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
-
 #undef __syscall_return
 #define __syscall_return(type, res)					\
 do {									\
diff --git a/ldso/ldso/sparc/dl-syscalls.h b/ldso/ldso/sparc/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/sparc/dl-syscalls.h
+++ b/ldso/ldso/sparc/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/x86_64/dl-syscalls.h b/ldso/ldso/x86_64/dl-syscalls.h
index 996bb87..f40c4fd 100644
--- a/ldso/ldso/x86_64/dl-syscalls.h
+++ b/ldso/ldso/x86_64/dl-syscalls.h
@@ -1,6 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
+/* stub for arch-specific syscall issues */
diff --git a/ldso/ldso/xtensa/dl-syscalls.h b/ldso/ldso/xtensa/dl-syscalls.h
index 4b42a57..f40c4fd 100644
--- a/ldso/ldso/xtensa/dl-syscalls.h
+++ b/ldso/ldso/xtensa/dl-syscalls.h
@@ -1,7 +1 @@
-/* We can't use the real errno in ldso, since it has not yet
- * been dynamicly linked in yet. */
-#include "sys/syscall.h"
-extern int _dl_errno;
-#undef __set_errno
-#define __set_errno(X) {(_dl_errno) = (X);}
-
+/* stub for arch-specific syscall issues */


More information about the uClibc-cvs mailing list