aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-11 09:30:37 +0000
committerRoland McGrath <roland@gnu.org>2003-03-11 09:30:37 +0000
commitb33e61633a10a233510f6f49b97b7e2ad15c7311 (patch)
tree9b6025b692435f629bc771dca74dcfb48e41768a /sysdeps
parent5d5d5969b17422e3b1af6f88436e91f32a36fd58 (diff)
downloadglibc-b33e61633a10a233510f6f49b97b7e2ad15c7311.tar
glibc-b33e61633a10a233510f6f49b97b7e2ad15c7311.tar.gz
glibc-b33e61633a10a233510f6f49b97b7e2ad15c7311.tar.bz2
glibc-b33e61633a10a233510f6f49b97b7e2ad15c7311.zip
* sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): If CNT == 1,
allocate space even for the trailing '/'. Reported by John Reiser <jreiser@BitWagon.com>. * sysdeps/unix/sysv/linux/ia64/sysdep.h (LOAD_ARGS_6, ASM_ARGS_6, ASM_CLOBBERS_6): Define. (ASM_CLOBBERS_5): Use ASM_CLOBBERS_6. * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Reorder arguments to match IA-32 order. * sysdeps/unix/sysv/linux/i386/clone.S: Fix comment.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-sysdep.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/clone.S4
-rw-r--r--sysdeps/unix/sysv/linux/ia64/clone2.S8
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h7
4 files changed, 13 insertions, 8 deletions
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index 22e8e8faf6..7d9a52e7d0 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -338,7 +338,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
/* Determine the total size of all strings together. */
if (cnt == 1)
- total = temp[0].len;
+ total = temp[0].len + 1;
else
{
total = (1UL << (cnt - 2)) * (temp[0].len + temp[cnt - 1].len + 2);
diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S
index c0d5c03568..1f7417effd 100644
--- a/sysdeps/unix/sysv/linux/i386/clone.S
+++ b/sysdeps/unix/sysv/linux/i386/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997,98,99,2000,02 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,98,99,2000,02,03 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
@@ -28,7 +28,7 @@
#include <bp-asm.h>
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
- pid_t *tid, struct user_desc *tls); */
+ pid_t *ptid, struct user_desc *tls, pid_t *ctid); */
#define PARMS LINKAGE /* no space for saved regs */
#define FUNC PARMS
diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/sysdeps/unix/sysv/linux/ia64/clone2.S
index f35c6703f5..bdd37ae6ae 100644
--- a/sysdeps/unix/sysv/linux/ia64/clone2.S
+++ b/sysdeps/unix/sysv/linux/ia64/clone2.S
@@ -23,7 +23,7 @@
/* int __clone2(int (*fn) (void *arg), void *child_stack_base, */
/* size_t child_stack_size, int flags, void *arg, */
-/* pid_t *child_tid, pid_t *parent_tid, void *tls) */
+/* pid_t *parent_tid, void *tls, pid_t *child_tid) */
ENTRY(__clone2)
alloc r2=ar.pfs,8,2,6,0
@@ -42,9 +42,9 @@ ENTRY(__clone2)
mov out0=in3 /* Flags are first syscall argument. */
mov out1=in1 /* Stack address. */
mov out2=in2 /* Stack size. */
- mov out3=in5 /* Child TID Pointer */
- mov out4=in6 /* Parent TID Pointer */
- mov out5=in7 /* TLS pointer */
+ mov out3=in7 /* Child TID Pointer */
+ mov out4=in5 /* Parent TID Pointer */
+ mov out5=in6 /* TLS pointer */
DO_CALL (SYS_ify (clone2))
cmp.eq p6,p0=-1,r10
;;
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 07e149e754..4522fb9c30 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -176,6 +176,9 @@
#define LOAD_ARGS_5(out0, out1, out2, out3, out4) \
register long _out4 asm ("out4") = (long) (out4); \
LOAD_ARGS_4 (out0, out1, out2, out3)
+#define LOAD_ARGS_6(out0, out1, out2, out3, out4, out5) \
+ register long _out5 asm ("out5") = (long) (out5); \
+ LOAD_ARGS_5 (out0, out1, out2, out3, out4)
#define ASM_ARGS_0
#define ASM_ARGS_1 ASM_ARGS_0, "r" (_out0)
@@ -183,13 +186,15 @@
#define ASM_ARGS_3 ASM_ARGS_2, "r" (_out2)
#define ASM_ARGS_4 ASM_ARGS_3, "r" (_out3)
#define ASM_ARGS_5 ASM_ARGS_4, "r" (_out4)
+#define ASM_ARGS_6 ASM_ARGS_5, "r" (_out5)
#define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0"
#define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1"
#define ASM_CLOBBERS_2 ASM_CLOBBERS_3, "out2"
#define ASM_CLOBBERS_3 ASM_CLOBBERS_4, "out3"
#define ASM_CLOBBERS_4 ASM_CLOBBERS_5, "out4"
-#define ASM_CLOBBERS_5 , "out5", "out6", "out7", \
+#define ASM_CLOBBERS_5 ASM_CLOBBERS_6, "out5"
+#define ASM_CLOBBERS_6 , "out6", "out7", \
/* Non-stacked integer registers, minus r8, r10, r15. */ \
"r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18", \
"r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", \