mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
2.5-18.1
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
ldd-rewrite.sed
|
||||
sys/elf.h
|
||||
sys/procfs.h
|
||||
sys/user.h
|
||||
3
sysdeps/unix/sysv/linux/s390/Implies
Normal file
3
sysdeps/unix/sysv/linux/s390/Implies
Normal file
@@ -0,0 +1,3 @@
|
||||
# These supply the ABI compatibility for when long double was double.
|
||||
ieee754/ldbl-64-128
|
||||
ieee754/ldbl-opt
|
||||
@@ -2,3 +2,7 @@
|
||||
ifeq ($(subdir),rt)
|
||||
librt-routines += rt-sysdep
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),stdlib)
|
||||
gen-as-const-headers += ucontext_i.sym
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* O_*, F_*, FD_* bit values for Linux.
|
||||
Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2001, 2002, 2004, 2006 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,6 +23,10 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <bits/wordsize.h>
|
||||
#ifdef __USE_GNU
|
||||
# include <bits/uio.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
|
||||
located on an ext2 file system */
|
||||
@@ -110,7 +114,7 @@
|
||||
# define F_NOTIFY 1026 /* Request notfications on a directory. */
|
||||
#endif
|
||||
|
||||
/* For F_[GET|SET]FL. */
|
||||
/* For F_[GET|SET]FD. */
|
||||
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
|
||||
@@ -199,10 +203,55 @@ struct flock64
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* Flags for SYNC_FILE_RANGE. */
|
||||
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
|
||||
in the range before performing the
|
||||
write. */
|
||||
# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
|
||||
dirty pages in the range which are
|
||||
not presently under writeback. */
|
||||
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
|
||||
the range after performing the
|
||||
write. */
|
||||
|
||||
/* Flags for SPLICE and VMSPLICE. */
|
||||
# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
|
||||
# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
|
||||
(but we may still block on the fd
|
||||
we splice from/to). */
|
||||
# define SPLICE_F_MORE 4 /* Expect more data. */
|
||||
# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#ifdef __USE_GNU
|
||||
|
||||
/* Provide kernel hint to read ahead. */
|
||||
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
|
||||
__THROW;
|
||||
|
||||
|
||||
/* Selective file content synch'ing. */
|
||||
extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
|
||||
unsigned int __flags);
|
||||
|
||||
|
||||
/* Splice address range into a pipe. */
|
||||
extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
|
||||
unsigned int __flags);
|
||||
|
||||
/* Splice two files together. */
|
||||
extern int splice (int __fdin, __off64_t *__offin, int __fdout,
|
||||
__off64_t *__offout, size_t __len, unsigned int __flags)
|
||||
__THROW;
|
||||
|
||||
/* In-kernel implementation of tee for pipe buffers. */
|
||||
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
|
||||
__THROW;
|
||||
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for POSIX memory map interface. Linux/s390 version.
|
||||
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000,2001,2002,2003,2005,2006 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
|
||||
@@ -79,6 +79,7 @@
|
||||
/* Flags for `mremap'. */
|
||||
#ifdef __USE_GNU
|
||||
# define MREMAP_MAYMOVE 1
|
||||
# define MREMAP_FIXED 2
|
||||
#endif
|
||||
|
||||
/* Advice to `madvise'. */
|
||||
@@ -88,6 +89,9 @@
|
||||
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
|
||||
# define MADV_WILLNEED 3 /* Will need these pages. */
|
||||
# define MADV_DONTNEED 4 /* Don't need these pages. */
|
||||
# define MADV_REMOVE 9 /* Remove these pages and resources. */
|
||||
# define MADV_DONTFORK 10 /* Do not inherit across fork. */
|
||||
# define MADV_DOFORK 11 /* Do inherit across fork. */
|
||||
#endif
|
||||
|
||||
/* The POSIX people had to invent similar names for the same things. */
|
||||
|
||||
@@ -80,6 +80,7 @@ struct shmid_ds
|
||||
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
|
||||
# define SHM_LOCKED 02000 /* segment will not be swapped */
|
||||
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
|
||||
# define SHM_NORESERVE 010000 /* don't check for reservations */
|
||||
|
||||
struct shminfo
|
||||
{
|
||||
|
||||
2
sysdeps/unix/sysv/linux/s390/fpu/Implies
Normal file
2
sysdeps/unix/sysv/linux/s390/fpu/Implies
Normal file
@@ -0,0 +1,2 @@
|
||||
# Override ldbl-opt with s390 specific routines.
|
||||
s390/fpu
|
||||
8
sysdeps/unix/sysv/linux/s390/nldbl-abi.h
Normal file
8
sysdeps/unix/sysv/linux/s390/nldbl-abi.h
Normal file
@@ -0,0 +1,8 @@
|
||||
/* ABI version for long double switch.
|
||||
This is used by the Versions and math_ldbl_opt.h files in
|
||||
sysdeps/ieee754/ldbl-opt/. It gives the ABI version where
|
||||
long double == double was replaced with proper long double
|
||||
for libm *l functions and libc functions using long double. */
|
||||
|
||||
#define NLDBL_VERSION GLIBC_2.4
|
||||
#define LONG_DOUBLE_COMPAT_VERSION GLIBC_2_4
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2005 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
|
||||
@@ -51,10 +51,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
|
||||
#undef process_elf_file
|
||||
#define process_elf_file process_elf32_file
|
||||
#define __ELF_NATIVE_CLASS 32
|
||||
#include "sysdeps/generic/readelflib.c"
|
||||
#include "elf/readelflib.c"
|
||||
|
||||
#undef __ELF_NATIVE_CLASS
|
||||
#undef process_elf_file
|
||||
#define process_elf_file process_elf64_file
|
||||
#define __ELF_NATIVE_CLASS 64
|
||||
#include "sysdeps/generic/readelflib.c"
|
||||
#include "elf/readelflib.c"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
clone.S
|
||||
oldgetrlimit64.c
|
||||
setresuid.c
|
||||
setresgid.c
|
||||
setfsuid.c
|
||||
setfsgid.c
|
||||
ucontext_i.h
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000,2001,2002,2003,2004,2006 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
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <bp-checks.h>
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
#include "kernel-features.h"
|
||||
#include <kernel-features.h>
|
||||
|
||||
/*
|
||||
In Linux 2.1.x the chown functions have been changed. A new function lchown
|
||||
|
||||
1
sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c
Normal file
1
sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c
Normal file
@@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/fchownat.c>
|
||||
1
sysdeps/unix/sysv/linux/s390/s390-32/fxstatat.c
Normal file
1
sysdeps/unix/sysv/linux/s390/s390-32/fxstatat.c
Normal file
@@ -0,0 +1 @@
|
||||
#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
|
||||
@@ -72,4 +72,4 @@ ENTRY(__getcontext)
|
||||
br %r14
|
||||
END(__getcontext)
|
||||
|
||||
weak_alias(__getcontext, getcontext)
|
||||
weak_alias (__getcontext, getcontext)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2001, 2003, 2006 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
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <bp-checks.h>
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
#include "kernel-features.h"
|
||||
#include <kernel-features.h>
|
||||
|
||||
# ifdef __NR_lchown32
|
||||
# if __ASSUME_32BITUIDS == 0
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
+-----------------------+
|
||||
n | overflow parameters | 96
|
||||
+-----------------------+
|
||||
8 | trampoline | 96+n
|
||||
+-----------------------+
|
||||
The registers are set up like this:
|
||||
%r2-%r6: parameters 1 to 5
|
||||
%r7 : (*func) pointer
|
||||
@@ -55,18 +53,16 @@
|
||||
void
|
||||
__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
|
||||
{
|
||||
extern void __makecontext_ret (void);
|
||||
unsigned long *sp;
|
||||
va_list ap;
|
||||
int i;
|
||||
|
||||
sp = (long *) (((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & -8L);
|
||||
|
||||
/* Setup the trampoline. */
|
||||
*--sp = 0x07f90000;
|
||||
*--sp = 0x0de71828;
|
||||
sp = (unsigned long *) (((unsigned long) ucp->uc_stack.ss_sp
|
||||
+ ucp->uc_stack.ss_size) & -8L);
|
||||
|
||||
/* Set the return address to trampoline. */
|
||||
ucp->uc_mcontext.gregs[14] = (long) sp;
|
||||
ucp->uc_mcontext.gregs[14] = (long) __makecontext_ret;
|
||||
|
||||
/* Set register parameters. */
|
||||
va_start (ap, argc);
|
||||
@@ -98,4 +94,12 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
|
||||
ucp->uc_mcontext.gregs[15] = (long) sp;
|
||||
}
|
||||
|
||||
asm(".text\n"
|
||||
".type __makecontext_ret,@function\n"
|
||||
"__makecontext_ret:\n"
|
||||
" basr %r14,%r7\n"
|
||||
" lr %r2,%r8\n"
|
||||
" br %r9\n"
|
||||
".size __makecontext_ret, .-__makecontext_ret");
|
||||
|
||||
weak_alias (__makecontext, makecontext)
|
||||
|
||||
@@ -69,4 +69,4 @@ ENTRY(__setcontext)
|
||||
br %r14
|
||||
END(__setcontext)
|
||||
|
||||
weak_alias(__setcontext, setcontext)
|
||||
weak_alias (__setcontext, setcontext)
|
||||
|
||||
@@ -105,4 +105,4 @@ ENTRY(__swapcontext)
|
||||
/* Return. */
|
||||
br %r14
|
||||
END(__swapcontext)
|
||||
weak_alias(__swapcontext, swapcontext)
|
||||
weak_alias (__swapcontext, swapcontext)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -48,13 +48,14 @@ ENTRY (syscall)
|
||||
lr %r4,%r5 /* third parameter */
|
||||
lr %r5,%r6 /* fourth parameter */
|
||||
l %r6,192(%r15) /* fifth parameter */
|
||||
l %r7,196(%r15) /* sixth parameter */
|
||||
|
||||
basr %r7,0
|
||||
0: cl %r1,4f-0b(%r7) /* svc number < 256? */
|
||||
basr %r8,0
|
||||
0: cl %r1,4f-0b(%r8) /* svc number < 256? */
|
||||
jl 2f
|
||||
1: svc 0
|
||||
j 3f
|
||||
2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */
|
||||
2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */
|
||||
3: l %r15,0(%r15) /* load back chain */
|
||||
cfi_adjust_cfa_offset (-96)
|
||||
lm %r6,15,24(%r15) /* load registers */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2000,01,02,03,04 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -23,6 +24,7 @@
|
||||
#include <sysdeps/s390/s390-32/sysdep.h>
|
||||
#include <sysdeps/unix/sysdep.h>
|
||||
#include <dl-sysdep.h> /* For RTLD_PRIVATE_ERRNO. */
|
||||
#include <tls.h>
|
||||
|
||||
/* For Linux we can use the system call table in the header file
|
||||
/usr/include/asm/unistd.h
|
||||
@@ -111,8 +113,8 @@
|
||||
0: lcr %r0,%r2; \
|
||||
basr %r1,0; \
|
||||
1: al %r1,2f-1b(%r1); \
|
||||
l %r1,SYSCALL_ERROR_ERRNO@gotntpoff(%r1) \
|
||||
ear %r2,%a0 \
|
||||
l %r1,SYSCALL_ERROR_ERRNO@gotntpoff(%r1); \
|
||||
ear %r2,%a0; \
|
||||
st %r0,0(%r1,%r2); \
|
||||
lhi %r2,-1; \
|
||||
br %r14; \
|
||||
@@ -147,19 +149,28 @@
|
||||
arg 3 4 call-clobbered
|
||||
arg 4 5 call-clobbered
|
||||
arg 5 6 call-saved
|
||||
arg 6 7 call-saved
|
||||
|
||||
(Of course a function with say 3 arguments does not have entries for
|
||||
arguments 4 and 5.)
|
||||
S390 does not need to do ANY stack operations to get its parameters
|
||||
right.
|
||||
For system calls with 6 parameters a stack operation is required
|
||||
to load the 6th parameter to register 7. Call saved register 7 is
|
||||
moved to register 0 and back to avoid an additional stack frame.
|
||||
*/
|
||||
|
||||
#define DO_CALL(syscall, args) \
|
||||
.if args > 5; \
|
||||
lr %r0,%r7; \
|
||||
l %r7,96(%r15); \
|
||||
.endif; \
|
||||
.if SYS_ify (syscall) < 256; \
|
||||
svc SYS_ify (syscall); \
|
||||
.else; \
|
||||
lhi %r1,SYS_ify (syscall); \
|
||||
svc 0; \
|
||||
.endif; \
|
||||
.if args > 5; \
|
||||
lr %r7,%r0; \
|
||||
.endif
|
||||
|
||||
#define ret \
|
||||
@@ -253,6 +264,9 @@
|
||||
#define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||
DECLARGS_4(arg1, arg2, arg3, arg4) \
|
||||
register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
|
||||
#define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||
DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||
register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);
|
||||
|
||||
#define ASMFMT_0
|
||||
#define ASMFMT_1 , "0" (gpr2)
|
||||
@@ -260,5 +274,28 @@
|
||||
#define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
|
||||
#define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
|
||||
#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
|
||||
#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
|
||||
|
||||
|
||||
/* Pointer mangling support. */
|
||||
#if defined NOT_IN_libc && defined IS_IN_rtld
|
||||
/* We cannot use the thread descriptor because in ld.so we use setjmp
|
||||
earlier than the descriptor is initialized. */
|
||||
#else
|
||||
/* For the time being just use stack_guard rather than a separate
|
||||
pointer_guard. */
|
||||
# ifdef __ASSEMBLER__
|
||||
# define PTR_MANGLE(reg, tmpreg) \
|
||||
ear tmpreg,%a0; \
|
||||
x reg,STACK_GUARD(tmpreg)
|
||||
# define PTR_MANGLE2(reg, tmpreg) \
|
||||
x reg,STACK_GUARD(tmpreg)
|
||||
# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg)
|
||||
# else
|
||||
# define PTR_MANGLE(var) \
|
||||
(var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
|
||||
# define PTR_DEMANGLE(var) PTR_MANGLE (var)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_S390_SYSDEP_H */
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* Constants shared between setcontext() and getcontext(). Don't
|
||||
install this header file. */
|
||||
|
||||
#define SIG_BLOCK 0
|
||||
#define SIG_UNBLOCK 1
|
||||
#define SIG_SETMASK 2
|
||||
|
||||
#define SC_FLGS 0x000
|
||||
#define SC_LINK 0x004
|
||||
#define SC_STCK 0x008
|
||||
#define SC_PSW 0x018
|
||||
#define SC_GPRS 0x020
|
||||
#define SC_ACRS 0x060
|
||||
#define SC_FPC 0x0A0
|
||||
#define SC_FPRS 0x0A8
|
||||
#define SC_MASK 0x128
|
||||
@@ -1,2 +0,0 @@
|
||||
clone.S
|
||||
ucontext_i.h
|
||||
@@ -72,4 +72,4 @@ ENTRY(__getcontext)
|
||||
br %r14
|
||||
END(__getcontext)
|
||||
|
||||
weak_alias(__getcontext, getcontext)
|
||||
weak_alias (__getcontext, getcontext)
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
+-----------------------+
|
||||
n | overflow parameters | 160
|
||||
+-----------------------+
|
||||
8 | trampoline | 160+n
|
||||
+-----------------------+
|
||||
The registers are set up like this:
|
||||
%r2-%r6: parameters 1 to 5
|
||||
%r7 : (*func) pointer
|
||||
@@ -55,17 +53,16 @@
|
||||
void
|
||||
__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
|
||||
{
|
||||
extern void __makecontext_ret (void);
|
||||
unsigned long *sp;
|
||||
va_list ap;
|
||||
int i;
|
||||
|
||||
sp = (long *) (((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & -8L);
|
||||
|
||||
/* Setup the trampoline. */
|
||||
*--sp = 0x0de7b904002807f9;
|
||||
sp = (unsigned long *) (((unsigned long) ucp->uc_stack.ss_sp
|
||||
+ ucp->uc_stack.ss_size) & -8L);
|
||||
|
||||
/* Set the return address to trampoline. */
|
||||
ucp->uc_mcontext.gregs[14] = (long) sp;
|
||||
ucp->uc_mcontext.gregs[14] = (long) __makecontext_ret;
|
||||
|
||||
/* Set register parameters. */
|
||||
va_start (ap, argc);
|
||||
@@ -97,4 +94,12 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
|
||||
ucp->uc_mcontext.gregs[15] = (long) sp;
|
||||
}
|
||||
|
||||
asm(".text\n"
|
||||
".type __makecontext_ret,@function\n"
|
||||
"__makecontext_ret:\n"
|
||||
" basr %r14,%r7\n"
|
||||
" lgr %r2,%r8\n"
|
||||
" br %r9\n"
|
||||
".size __makecontext_ret, .-__makecontext_ret");
|
||||
|
||||
weak_alias (__makecontext, makecontext)
|
||||
|
||||
@@ -69,4 +69,4 @@ ENTRY(__setcontext)
|
||||
br %r14
|
||||
END(__setcontext)
|
||||
|
||||
weak_alias(__setcontext, setcontext)
|
||||
weak_alias (__setcontext, setcontext)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2002, 2003, 2005 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
|
||||
@@ -44,6 +44,10 @@ __libc_sigaction (sig, act, oact)
|
||||
}
|
||||
libc_hidden_def (__libc_sigaction)
|
||||
|
||||
#ifdef WRAPPER_INCLUDE
|
||||
# include WRAPPER_INCLUDE
|
||||
#endif
|
||||
|
||||
#ifndef LIBC_SIGACTION
|
||||
weak_alias (__libc_sigaction, __sigaction)
|
||||
libc_hidden_weak (__sigaction)
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/* Copyright (C) 2001, 2002, 2003 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
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sysdep-cancel.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
/* Change the set of blocked signals to SET,
|
||||
wait until a signal arrives, and restore the set of blocked signals. */
|
||||
int
|
||||
__sigsuspend (set)
|
||||
const sigset_t *set;
|
||||
{
|
||||
/* XXX The size argument hopefully will have to be changed to the
|
||||
real size of the user-level sigset_t. */
|
||||
if (SINGLE_THREAD_P)
|
||||
return INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
|
||||
|
||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
|
||||
int result = INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
|
||||
|
||||
LIBC_CANCEL_RESET (oldtype);
|
||||
|
||||
return result;
|
||||
}
|
||||
libc_hidden_def (__sigsuspend)
|
||||
weak_alias (__sigsuspend, sigsuspend)
|
||||
strong_alias (__sigsuspend, __libc_sigsuspend)
|
||||
@@ -128,6 +128,7 @@ L(socket_cancel):
|
||||
j 4b
|
||||
#endif
|
||||
|
||||
SYSCALL_ERROR_HANDLER
|
||||
END (__socket)
|
||||
|
||||
#ifndef NO_WEAK_ALIAS
|
||||
|
||||
@@ -105,4 +105,4 @@ ENTRY(__swapcontext)
|
||||
/* Return. */
|
||||
br %r14
|
||||
END(__swapcontext)
|
||||
weak_alias(__swapcontext, swapcontext)
|
||||
weak_alias (__swapcontext, swapcontext)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -48,13 +48,14 @@ ENTRY (syscall)
|
||||
lgr %r4,%r5 /* Third parameter. */
|
||||
lgr %r5,%r6 /* Fourth parameter. */
|
||||
lg %r6,320(%r15) /* Fifth parameter. */
|
||||
lg %r7,328(%r15) /* Sixth parameter. */
|
||||
|
||||
basr %r7,0
|
||||
0: clg %r1,4f-0b(%r7) /* svc number < 256? */
|
||||
basr %r8,0
|
||||
0: clg %r1,4f-0b(%r8) /* svc number < 256? */
|
||||
jl 2f
|
||||
1: svc 0
|
||||
j 3f
|
||||
2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */
|
||||
2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */
|
||||
3: lg %r15,0(%r15) /* load back chain */
|
||||
cfi_adjust_cfa_offset (-160)
|
||||
lmg %r6,15,48(%r15) /* Load registers. */
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# File name Caller Syscall name # args Strong name Weak names
|
||||
|
||||
getpeername - getpeername i:ipp __getpeername getpeername
|
||||
vfork - vfork 0 __vfork vfork
|
||||
|
||||
# semaphore and shm system calls
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* Assembler macros for 64 bit S/390.
|
||||
Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -24,6 +25,7 @@
|
||||
#include <sysdeps/s390/s390-64/sysdep.h>
|
||||
#include <sysdeps/unix/sysdep.h>
|
||||
#include <dl-sysdep.h> /* For RTLD_PRIVATE_ERRNO. */
|
||||
#include <tls.h>
|
||||
|
||||
/* For Linux we can use the system call table in the header file
|
||||
/usr/include/asm/unistd.h
|
||||
@@ -149,19 +151,28 @@
|
||||
arg 3 4 call-clobbered
|
||||
arg 4 5 call-clobbered
|
||||
arg 5 6 call-saved
|
||||
arg 6 7 call-saved
|
||||
|
||||
(Of course a function with say 3 arguments does not have entries for
|
||||
arguments 4 and 5.)
|
||||
S390 does not need to do ANY stack operations to get its parameters
|
||||
right.
|
||||
For system calls with 6 parameters a stack operation is required
|
||||
to load the 6th parameter to register 7. Call saved register 7 is
|
||||
moved to register 0 and back to avoid an additional stack frame.
|
||||
*/
|
||||
|
||||
#define DO_CALL(syscall, args) \
|
||||
.if args > 5; \
|
||||
lgr %r0,%r7; \
|
||||
lg %r7,160(%r15); \
|
||||
.endif; \
|
||||
.if SYS_ify (syscall) < 256; \
|
||||
svc SYS_ify (syscall); \
|
||||
.else; \
|
||||
lghi %r1,SYS_ify (syscall); \
|
||||
svc 0; \
|
||||
.endif; \
|
||||
.if args > 5; \
|
||||
lgr %r7,%r0; \
|
||||
.endif
|
||||
|
||||
#define ret \
|
||||
@@ -255,6 +266,9 @@
|
||||
#define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||
DECLARGS_4(arg1, arg2, arg3, arg4) \
|
||||
register unsigned long gpr6 asm ("6") = (unsigned long)(arg5);
|
||||
#define DECLARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||
DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||
register unsigned long gpr7 asm ("7") = (unsigned long)(arg6);
|
||||
|
||||
#define ASMFMT_0
|
||||
#define ASMFMT_1 , "0" (gpr2)
|
||||
@@ -262,5 +276,29 @@
|
||||
#define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4)
|
||||
#define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5)
|
||||
#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6)
|
||||
#define ASMFMT_6 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6), "d" (gpr7)
|
||||
|
||||
/* Pointer mangling support. */
|
||||
#if defined NOT_IN_libc && defined IS_IN_rtld
|
||||
/* We cannot use the thread descriptor because in ld.so we use setjmp
|
||||
earlier than the descriptor is initialized. */
|
||||
#else
|
||||
/* For the time being just use stack_guard rather than a separate
|
||||
pointer_guard. */
|
||||
# ifdef __ASSEMBLER__
|
||||
# define PTR_MANGLE(reg, tmpreg) \
|
||||
ear tmpreg,%a0; \
|
||||
sllg tmpreg,tmpreg,32; \
|
||||
ear tmpreg,%a1; \
|
||||
xg reg,STACK_GUARD(tmpreg)
|
||||
# define PTR_MANGLE2(reg, tmpreg) \
|
||||
xg reg,STACK_GUARD(tmpreg)
|
||||
# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg)
|
||||
# else
|
||||
# define PTR_MANGLE(var) \
|
||||
(var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
|
||||
# define PTR_DEMANGLE(var) PTR_MANGLE (var)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_S390_SYSDEP_H */
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* Constants shared between setcontext() and getcontext(). Don't
|
||||
install this header file. */
|
||||
|
||||
#define SIG_BLOCK 0
|
||||
#define SIG_UNBLOCK 1
|
||||
#define SIG_SETMASK 2
|
||||
|
||||
#define SC_FLGS 0x000
|
||||
#define SC_LINK 0x008
|
||||
#define SC_STCK 0x010
|
||||
#define SC_PSW 0x028
|
||||
#define SC_GPRS 0x038
|
||||
#define SC_ACRS 0x0B8
|
||||
#define SC_FPC 0x0F8
|
||||
#define SC_FPRS 0x100
|
||||
#define SC_MASK 0x180
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* `ptrace' debugger support interface. Linux version.
|
||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2006 Free Software Foundation, Inc.
|
||||
Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -118,8 +118,24 @@ enum __ptrace_request
|
||||
#define PT_DETACH PTRACE_DETACH
|
||||
|
||||
/* Continue and stop at the next (return from) syscall. */
|
||||
PTRACE_SYSCALL = 24
|
||||
PTRACE_SYSCALL = 24,
|
||||
#define PT_SYSCALL PTRACE_SYSCALL
|
||||
|
||||
/* Set ptrace filter options. */
|
||||
PTRACE_SETOPTIONS = 0x4200,
|
||||
#define PT_SETOPTIONS PTRACE_SETOPTIONS
|
||||
|
||||
/* Get last ptrace message. */
|
||||
PTRACE_GETEVENTMSG = 0x4201,
|
||||
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
|
||||
|
||||
/* Get siginfo for process. */
|
||||
PTRACE_GETSIGINFO = 0x4202,
|
||||
#define PT_GETSIGINFO PTRACE_GETSIGINFO
|
||||
|
||||
/* Set new siginfo for process. */
|
||||
PTRACE_SETSIGINFO = 0x4203
|
||||
#define PT_SETSIGINFO PTRACE_SETSIGINFO
|
||||
};
|
||||
|
||||
/* Perform process tracing functions. REQUEST is one of the values
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000,2005 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
|
||||
@@ -19,6 +19,65 @@
|
||||
#ifndef _SYS_USER_H
|
||||
#define _SYS_USER_H 1
|
||||
|
||||
#include <asm/user.h>
|
||||
/* The whole purpose of this file is for GDB and GDB only. Don't read
|
||||
too much into it. Don't use it for anything other than GDB unless
|
||||
you know what you are doing. */
|
||||
|
||||
struct _user_psw_struct
|
||||
{
|
||||
unsigned long mask;
|
||||
unsigned long addr;
|
||||
};
|
||||
|
||||
struct _user_fpregs_struct
|
||||
{
|
||||
unsigned int fpc;
|
||||
double fprs[16];
|
||||
};
|
||||
|
||||
struct _user_per_struct
|
||||
{
|
||||
unsigned long control_regs[3];
|
||||
unsigned single_step : 1;
|
||||
unsigned instruction_fetch : 1;
|
||||
unsigned : 30;
|
||||
unsigned long starting_addr;
|
||||
unsigned long ending_addr;
|
||||
unsigned short perc_atmid;
|
||||
unsigned long address;
|
||||
unsigned char access_id;
|
||||
};
|
||||
|
||||
struct _user_regs_struct
|
||||
{
|
||||
struct _user_psw_struct psw; /* Program status word. */
|
||||
unsigned long gprs[16]; /* General purpose registers. */
|
||||
unsigned int acrs[16]; /* Access registers. */
|
||||
unsigned long orig_gpr2; /* Original gpr2. */
|
||||
struct _user_fpregs_struct fp_regs; /* Floating point registers. */
|
||||
struct _user_per_struct per_info; /* Hardware tracing registers. */
|
||||
unsigned long ieee_instruction_pointer;
|
||||
};
|
||||
|
||||
struct user {
|
||||
struct _user_regs_struct regs; /* User registers. */
|
||||
unsigned long int u_tsize; /* Text segment size (pages). */
|
||||
unsigned long int u_dsize; /* Data segment size (pages). */
|
||||
unsigned long int u_ssize; /* Stack segment size (pages). */
|
||||
unsigned long start_code; /* Starting address of text. */
|
||||
unsigned long start_stack; /* Starting address of stack area. */
|
||||
long int signal; /* Signal causing the core dump. */
|
||||
struct _user_regs_struct *u_ar0; /* Help gdb find registers. */
|
||||
unsigned long magic; /* Identifies a core file. */
|
||||
char u_comm[32]; /* User command naem. */
|
||||
};
|
||||
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SIZE (1UL << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif /* _SYS_USER_H */
|
||||
|
||||
23
sysdeps/unix/sysv/linux/s390/ucontext_i.sym
Normal file
23
sysdeps/unix/sysv/linux/s390/ucontext_i.sym
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <stddef.h>
|
||||
#include <signal.h>
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
--
|
||||
|
||||
SIG_BLOCK
|
||||
SIG_UNBLOCK
|
||||
SIG_SETMASK
|
||||
|
||||
#define ucontext(member) offsetof (ucontext_t, member)
|
||||
#define mcontext(member) ucontext (uc_mcontext.member)
|
||||
|
||||
SC_FLGS ucontext (uc_flags)
|
||||
SC_LINK ucontext (uc_link)
|
||||
SC_STCK ucontext (uc_stack.ss_sp)
|
||||
SC_STSZ ucontext (uc_stack.ss_size)
|
||||
SC_PSW mcontext (psw)
|
||||
SC_GPRS mcontext (gregs)
|
||||
SC_ACRS mcontext (aregs)
|
||||
SC_FPC mcontext (fpregs.fpc)
|
||||
SC_FPRS mcontext (fpregs.fprs)
|
||||
SC_MASK ucontext (uc_sigmask)
|
||||
Reference in New Issue
Block a user