aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--elf/rtld.c2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/mmap64.c9
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h57
4 files changed, 69 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 26c69f6819..fcb3089ffb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2002-09-16 Roland McGrath <roland@redhat.com>
+ * sysdeps/unix/sysv/linux/powerpc/mmap64.c (__mmap64): Add a cast.
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
+ New macro.
+
+ * elf/rtld.c [HP_TIMING_NONAVAIL]: Fix last change for this case.
+
* include/unistd.h: Uncomment libc_hidden_proto for _exit.
* sysdeps/mach/hurd/_exit.c: Add libc_hidden_def.
* sysdeps/generic/_exit.c: Likewise.
diff --git a/elf/rtld.c b/elf/rtld.c
index 2d20696d92..715dc1a7bf 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -198,7 +198,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
/* If it hasn't happen yet record the startup time. */
if (! HP_TIMING_INLINE)
HP_TIMING_NOW (start_time);
-#ifndef DONT_USE_BOOTSTRAP_MAP
+#if !defined DONT_USE_BOOTSTRAP_MAP && !defined HP_TIMING_NONAVAIL
else
start_time = info->start_time;
#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/mmap64.c b/sysdeps/unix/sysv/linux/powerpc/mmap64.c
index d94deb040f..63f32e9908 100644
--- a/sysdeps/unix/sysv/linux/powerpc/mmap64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/mmap64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -56,9 +56,10 @@ __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
int saved_errno = errno;
# endif
void *result;
- __ptrvalue (result) = INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr), len,
- prot, flags, fd,
- (off_t) (offset >> PAGE_SHIFT));
+ __ptrvalue (result)
+ = (void *) INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr), len,
+ prot, flags, fd,
+ (off_t) (offset >> PAGE_SHIFT));
# if __BOUNDED_POINTERS__
__ptrlow (result) = __ptrvalue (result);
__ptrhigh (result) = __ptrvalue (result) + len;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
index 78ff4edcc6..524a32b9b4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1992,97,98,99,2000,01,02 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
@@ -32,4 +32,59 @@
# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
+#ifndef __ASSEMBLER__
+
+# include <errno.h>
+
+# undef INLINE_SYSCALL
+# define INLINE_SYSCALL(name, nr, args...) \
+ ({ \
+ long ret, err; \
+ LOADARGS_##nr(name, args); \
+ __asm__ ("sc\n\t" \
+ "mfcr %1\n\t" \
+ : "=r" (r3), "=r" (err) \
+ : ASM_INPUT_##nr \
+ : "cc", "memory"); \
+ ret = r3; \
+ if (err & 1 << 28) \
+ { \
+ __set_errno (ret); \
+ ret = -1L; \
+ } \
+ ret; \
+ })
+
+# define LOADARGS_0(name) \
+ register long r0 __asm__ ("r0") = __NR_##name; \
+ register long r3 __asm__ ("r3")
+# define LOADARGS_1(name, arg1) \
+ LOADARGS_0(name) = (long) (arg1)
+# define LOADARGS_2(name, arg1, arg2) \
+ LOADARGS_1(name, arg1); \
+ register long r4 __asm__ ("r4") = (long) (arg2)
+# define LOADARGS_3(name, arg1, arg2, arg3) \
+ LOADARGS_2(name, arg1, arg2); \
+ register long r5 __asm__ ("r5") = (long) (arg3)
+# define LOADARGS_4(name, arg1, arg2, arg3, arg4) \
+ LOADARGS_3(name, arg1, arg2, arg3); \
+ register long r6 __asm__ ("r6") = (long) (arg4)
+# define LOADARGS_5(name, arg1, arg2, arg3, arg4, arg5) \
+ LOADARGS_4(name, arg1, arg2, arg3, arg4); \
+ register long r7 __asm__ ("r7") = (long) (arg5)
+# define LOADARGS_6(name, arg1, arg2, arg3, arg4, arg5, arg6) \
+ LOADARGS_5(name, arg1, arg2, arg3, arg4, arg5); \
+ register long r8 __asm__ ("r8") = (long) (arg6)
+
+# define ASM_INPUT_0 "r" (r0)
+# define ASM_INPUT_1 ASM_INPUT_0, "0" (r3)
+# define ASM_INPUT_2 ASM_INPUT_1, "r" (r4)
+# define ASM_INPUT_3 ASM_INPUT_2, "r" (r5)
+# define ASM_INPUT_4 ASM_INPUT_3, "r" (r6)
+# define ASM_INPUT_5 ASM_INPUT_4, "r" (r7)
+# define ASM_INPUT_6 ASM_INPUT_5, "r" (r8)
+
+#endif /* __ASSEMBLER__ */
+
+
#endif /* linux/powerpc/sysdep.h */