mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
* 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.
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
2002-09-16 Roland McGrath <roland@redhat.com>
|
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.
|
* include/unistd.h: Uncomment libc_hidden_proto for _exit.
|
||||||
* sysdeps/mach/hurd/_exit.c: Add libc_hidden_def.
|
* sysdeps/mach/hurd/_exit.c: Add libc_hidden_def.
|
||||||
* sysdeps/generic/_exit.c: Likewise.
|
* sysdeps/generic/_exit.c: Likewise.
|
||||||
|
@@ -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 it hasn't happen yet record the startup time. */
|
||||||
if (! HP_TIMING_INLINE)
|
if (! HP_TIMING_INLINE)
|
||||||
HP_TIMING_NOW (start_time);
|
HP_TIMING_NOW (start_time);
|
||||||
#ifndef DONT_USE_BOOTSTRAP_MAP
|
#if !defined DONT_USE_BOOTSTRAP_MAP && !defined HP_TIMING_NONAVAIL
|
||||||
else
|
else
|
||||||
start_time = info->start_time;
|
start_time = info->start_time;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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;
|
int saved_errno = errno;
|
||||||
# endif
|
# endif
|
||||||
void *result;
|
void *result;
|
||||||
__ptrvalue (result) = INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr), len,
|
__ptrvalue (result)
|
||||||
prot, flags, fd,
|
= (void *) INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr), len,
|
||||||
(off_t) (offset >> PAGE_SHIFT));
|
prot, flags, fd,
|
||||||
|
(off_t) (offset >> PAGE_SHIFT));
|
||||||
# if __BOUNDED_POINTERS__
|
# if __BOUNDED_POINTERS__
|
||||||
__ptrlow (result) = __ptrvalue (result);
|
__ptrlow (result) = __ptrvalue (result);
|
||||||
__ptrhigh (result) = __ptrvalue (result) + len;
|
__ptrhigh (result) = __ptrvalue (result) + len;
|
||||||
|
@@ -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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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
|
# define SYS_ify(syscall_name) __NR_/**/syscall_name
|
||||||
#endif
|
#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 */
|
#endif /* linux/powerpc/sysdep.h */
|
||||||
|
Reference in New Issue
Block a user