about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/_G_config.h2
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.S8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c16
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S7
4 files changed, 24 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/_G_config.h b/sysdeps/unix/sysv/linux/_G_config.h
index 5dda3d71db..61a4bf6f92 100644
--- a/sysdeps/unix/sysv/linux/_G_config.h
+++ b/sysdeps/unix/sysv/linux/_G_config.h
@@ -8,6 +8,7 @@
 
 #include <bits/types.h>
 #define __need_size_t
+#define __need_wchar_t
 #define __need_wint_t
 #define __need_NULL
 #include <stddef.h>
@@ -27,6 +28,7 @@ typedef unsigned int wint_t;
 #define _G_off64_t	__off64_t
 #define	_G_pid_t	__pid_t
 #define	_G_uid_t	__uid_t
+#define _G_wchar_t	wchar_t
 #define _G_wint_t	wint_t
 #define _G_stat64	stat
 
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.S b/sysdeps/unix/sysv/linux/i386/sysdep.S
index f7eac4d225..180c42506e 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.S
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.S
@@ -25,12 +25,14 @@
    it somewhere else.
 
    ...and this place is here.  */
-	.data
+	.bss
 	.globl	errno
+	.type errno,@object
+	.size errno,4
 errno:
+	.space	4
 	.globl	_errno
-_errno:
-	.long	4
+_errno = errno
 
 /* The following code is only used in the shared library when we
    compile the reentrant version.  Otherwise each system call defines
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
index 211a56b9f0..a6655bf897 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -1,5 +1,5 @@
 /* Operating system support for run-time dynamic linker.  Linux/PPC version.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,11 +23,11 @@
 
 #define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp)	\
   do {								\
-    void **_tmp;						\
+    char **_tmp;						\
     (argc) = *(long *) cookie;					\
     (argv) = (char **) cookie + 1;				\
     (envp) = (argv) + (argc) + 1;				\
-    for (_tmp = (void **) (envp); *_tmp; ++_tmp)		\
+    for (_tmp = (envp); *_tmp; ++_tmp)				\
       continue;							\
     /* The following '++' is important!  */			\
     ++_tmp;							\
@@ -35,9 +35,15 @@
       {								\
 	size_t _test = (size_t)_tmp;				\
 	_test = _test + 0xf & ~0xf;				\
-	_tmp = (void **)_test;					\
+	/* When ld.so is being run directly, there is no	\
+	   alignment (and no argument vector), so we make a	\
+	   basic sanity check of the argument vector.  Of	\
+	   course, this means that in future, the argument	\
+	   vector will have to be laid out to allow for this	\
+	   test :-(.  */					\
+	if (((ElfW(auxv_t) *)_test)->a_type <= AT_PHDR)		\
       }								\
-    (auxp) = (void *) _tmp;					\
+    (auxp) = (ElfW(auxv_t) *) _tmp;				\
   } while (0)
 
 
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S
index 8b0a130106..d62a28f7b5 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.S
@@ -1,6 +1,11 @@
 /* Define errno */
 
-	.common errno,4,4
+	.bss
+	.globl	errno
+	.align	4
+errno:	.space	4
+	.type errno, @object
+	.size errno, 4
 
 	.globl	_errno
 _errno	= errno