aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/ia64
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/unix/sysv/linux/ia64
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'sysdeps/unix/sysv/linux/ia64')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/Dist13
-rw-r--r--sysdeps/unix/sysv/linux/ia64/__longjmp.S5
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/fcntl.h54
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/mman.h6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/setjmp.h7
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/shm.h7
-rw-r--r--sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c23
-rw-r--r--sysdeps/unix/sysv/linux/ia64/clone2.S6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/dl-cache.h27
-rw-r--r--sysdeps/unix/sysv/linux/ia64/dl-procinfo.c5
-rw-r--r--sysdeps/unix/sysv/linux/ia64/dl-procinfo.h5
-rw-r--r--sysdeps/unix/sysv/linux/ia64/getcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/has_cpuclock.c12
-rw-r--r--sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/readelflib.c6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/setcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/setjmp.S20
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sigaction.c6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sigsuspend.c49
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sys/ptrace.h28
-rw-r--r--sysdeps/unix/sysv/linux/ia64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h25
22 files changed, 187 insertions, 124 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/Dist b/sysdeps/unix/sysv/linux/ia64/Dist
deleted file mode 100644
index b4118bdead..0000000000
--- a/sysdeps/unix/sysv/linux/ia64/Dist
+++ /dev/null
@@ -1,13 +0,0 @@
-clone.S
-clone2.S
-dl-brk.S
-dl-static.c
-has_cpuclock.c
-ioperm.c
-ldd-rewrite.sed
-__start_context.S
-ucontext_i.h
-sys/procfs.h
-sys/io.h
-sys/rse.h
-sys/user.h
diff --git a/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/sysdeps/unix/sysv/linux/ia64/__longjmp.S
index 7922e81bea..aa18fadf9c 100644
--- a/sysdeps/unix/sysv/linux/ia64/__longjmp.S
+++ b/sysdeps/unix/sysv/linux/ia64/__longjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
The GNU C Library is free software; you can redistribute it and/or
@@ -101,6 +101,9 @@ LEAF(__longjmp)
ld8.nta r18=[r2],16 // b2
ld8.nta r19=[r3],16 // b3
;;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (r16, r24)
+#endif
ld8.nta r20=[r2],16 // b4
ld8.nta r21=[r3],16 // b5
;;
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
index d330954d48..ed8c2da9e2 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/IA64.
- Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 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,9 @@
#include <sys/types.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 */
@@ -40,9 +43,9 @@
#define O_SYNC 010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
-#define O_DIRECT 040000
#ifdef __USE_GNU
+# define O_DIRECT 040000
# define O_DIRECTORY 0200000 /* must be a directory */
# define O_NOFOLLOW 0400000 /* don't follow links */
# define O_NOATIME 01000000 /* Do not set atime. */
@@ -92,7 +95,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(). */
@@ -174,10 +177,55 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#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
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
index 01db5be028..a27a30fc0c 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/ia64 version.
- Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,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. */
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
index 76625753d9..8bd675e4ec 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
- Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
@@ -32,9 +32,4 @@
/* the __jmp_buf element type should be __float80 per ABI... */
typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
index 078345d7e6..7f38f2dd7b 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 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
@@ -38,6 +38,8 @@
/* Segment low boundary address multiple. */
#define SHMLBA (1024 * 1024)
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
/* Data structure describing a set of semaphores. */
struct shmid_ds
@@ -49,7 +51,7 @@ struct shmid_ds
__time_t shm_ctime; /* time of last change by shmctl() */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
- unsigned long int shm_nattch; /* number of current attaches */
+ shmatt_t shm_nattch; /* number of current attaches */
unsigned long int __unused1;
unsigned long int __unused2;
};
@@ -64,6 +66,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
{
diff --git a/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
index d2c45a560a..2f39851535 100644
--- a/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
+++ b/sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+/* clock_getcpuclockid -- Get a clockid_t for process CPU time. Linux/IA64
+ Copyright (C) 2000,2001,2003,2004 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
@@ -26,22 +27,6 @@
#include "has_cpuclock.c"
+#define HAS_CPUCLOCK (has_cpuclock () > 0)
-int
-clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
-{
- /* We don't allow any process ID but our own. */
- if (pid != 0 && pid != getpid ())
- return EPERM;
-
- int retval = ENOENT;
-
- if (has_cpuclock () > 0)
- {
- /* Store the number. */
- *clock_id = CLOCK_PROCESS_CPUTIME_ID;
- retval = 0;
- }
-
- return retval;
-}
+#include <sysdeps/unix/sysv/linux/clock_getcpuclockid.c>
diff --git a/sysdeps/unix/sysv/linux/ia64/clone2.S b/sysdeps/unix/sysv/linux/ia64/clone2.S
index 69c9e05044..d38eb201ad 100644
--- a/sysdeps/unix/sysv/linux/ia64/clone2.S
+++ b/sysdeps/unix/sysv/linux/ia64/clone2.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 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
@@ -32,10 +32,12 @@ ENTRY(__clone2)
.prologue
alloc r2=ar.pfs,8,1,6,0
cmp.eq p6,p0=0,in0
+ cmp.eq p7,p0=0,in1
mov r8=EINVAL
mov out0=in3 /* Flags are first syscall argument. */
mov out1=in1 /* Stack address. */
-(p6) br.cond.spnt.many __syscall_error
+(p6) br.cond.spnt.many __syscall_error /* no NULL function pointers */
+(p7) br.cond.spnt.many __syscall_error /* no NULL stack pointers */
;;
mov out2=in2 /* Stack size. */
mov out3=in5 /* Parent TID Pointer */
diff --git a/sysdeps/unix/sysv/linux/ia64/dl-cache.h b/sysdeps/unix/sysv/linux/ia64/dl-cache.h
index b8e2790589..c2165706c0 100644
--- a/sysdeps/unix/sysv/linux/ia64/dl-cache.h
+++ b/sysdeps/unix/sysv/linux/ia64/dl-cache.h
@@ -22,4 +22,31 @@
#define _dl_cache_check_flags(flags) \
((flags) == _DL_CACHE_DEFAULT_ID)
+#define EMUL_HACK "/emul/ia32-linux"
+
+#define arch_startup(argc, argv) unlink (EMUL_HACK LD_SO_CACHE)
+
+#define add_arch_dirs(config_file) \
+ do { \
+ int save_verbose = opt_verbose; \
+ opt_verbose = 0; \
+ \
+ parse_conf (config_file, EMUL_HACK, true); \
+ \
+ /* Always add the standard search paths. */ \
+ add_system_dir (EMUL_HACK SLIBDIR); \
+ if (strcmp (SLIBDIR, LIBDIR)) \
+ add_system_dir (EMUL_HACK LIBDIR); \
+ \
+ char emul_config_file[strlen (config_file) \
+ + sizeof EMUL_HACK]; \
+ strcpy (mempcpy (emul_config_file, EMUL_HACK, \
+ strlen (EMUL_HACK)), config_file); \
+ \
+ if (! access (emul_config_file, R_OK)) \
+ parse_conf (emul_config_file, EMUL_HACK, true); \
+ \
+ opt_verbose = save_verbose; \
+ } while (0)
+
#include_next <dl-cache.h>
diff --git a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
new file mode 100644
index 0000000000..7e26fecb3a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c
@@ -0,0 +1,5 @@
+#ifdef IS_IN_ldconfig
+#include <sysdeps/i386/dl-procinfo.c>
+#else
+#include <sysdeps/generic/dl-procinfo.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
new file mode 100644
index 0000000000..b360b4288a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h
@@ -0,0 +1,5 @@
+#ifdef IS_IN_ldconfig
+#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
+#else
+#include <sysdeps/generic/dl-procinfo.h>
+#endif
diff --git a/sysdeps/unix/sysv/linux/ia64/getcontext.S b/sysdeps/unix/sysv/linux/ia64/getcontext.S
index 0f9cc5db19..4e18bace2d 100644
--- a/sysdeps/unix/sysv/linux/ia64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/ia64/getcontext.S
@@ -155,4 +155,4 @@ ENTRY(__getcontext)
ret
END(__getcontext)
-weak_alias(__getcontext, getcontext)
+weak_alias (__getcontext, getcontext)
diff --git a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c
index ee19161272..39511cd2c5 100644
--- a/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c
+++ b/sysdeps/unix/sysv/linux/ia64/has_cpuclock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2003, 2004, 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
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
-
+#include <not-cancel.h>
static int itc_usable;
@@ -31,18 +31,18 @@ has_cpuclock (void)
if (__builtin_expect (itc_usable == 0, 0))
{
int newval = 1;
- int fd = open ("/proc/sal/itc_drift", O_RDONLY);
+ int fd = open_not_cancel_2 ("/proc/sal/itc_drift", O_RDONLY);
if (__builtin_expect (fd != -1, 1))
{
char buf[16];
/* We expect the file to contain a single digit followed by
a newline. If the format changes we better not rely on
the file content. */
- if (read (fd, buf, sizeof buf) != 2 || buf[0] != '0'
- || buf[1] != '\n')
+ if (read_not_cancel (fd, buf, sizeof buf) != 2
+ || buf[0] != '0' || buf[1] != '\n')
newval = -1;
- close (fd);
+ close_not_cancel_no_status (fd);
}
itc_usable = newval;
diff --git a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
index 535d1671e3..1df27afd2d 100644
--- a/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
+++ b/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
@@ -1 +1 @@
-s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
+s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 /emul/ia32-linux\2\3"_
diff --git a/sysdeps/unix/sysv/linux/ia64/readelflib.c b/sysdeps/unix/sysv/linux/ia64/readelflib.c
index 9b1a645d34..7a10d23c90 100644
--- a/sysdeps/unix/sysv/linux/ia64/readelflib.c
+++ b/sysdeps/unix/sysv/linux/ia64/readelflib.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 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"
diff --git a/sysdeps/unix/sysv/linux/ia64/setcontext.S b/sysdeps/unix/sysv/linux/ia64/setcontext.S
index e18c40fa4c..ef0a93c0c0 100644
--- a/sysdeps/unix/sysv/linux/ia64/setcontext.S
+++ b/sysdeps/unix/sysv/linux/ia64/setcontext.S
@@ -150,4 +150,4 @@ ENTRY(__setcontext)
ret
END(__setcontext)
-weak_alias(__setcontext, setcontext)
+weak_alias (__setcontext, setcontext)
diff --git a/sysdeps/unix/sysv/linux/ia64/setjmp.S b/sysdeps/unix/sysv/linux/ia64/setjmp.S
index 9c987c7ef8..53f80d203e 100644
--- a/sysdeps/unix/sysv/linux/ia64/setjmp.S
+++ b/sysdeps/unix/sysv/linux/ia64/setjmp.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
The GNU C Library is free software; you can redistribute it and/or
@@ -86,7 +87,7 @@ libc_hidden_def (_setjmp)
ENTRY(__sigsetjmp)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
- alloc loc1=ar.pfs,2,3,2,0
+ alloc loc1=ar.pfs,2,5,2,0
.save ar.unat, loc2
mov loc2=ar.unat
;;
@@ -140,7 +141,13 @@ ENTRY(__sigsetjmp)
;;
stf.spill.nta [r8]=f28,32
stf.spill.nta [r9]=f29,32
+#ifdef PTR_MANGLE
+ mov loc3=loc0
;;
+ PTR_MANGLE (loc3, loc4)
+#else
+ ;;
+#endif
stf.spill.nta [r8]=f30
stf.spill.nta [r9]=f31
@@ -151,7 +158,11 @@ ENTRY(__sigsetjmp)
mov r25=ar.unat
mov out0=in0
+#ifdef PTR_MANGLE
+ st8.nta [r2]=loc3,16 // b0
+#else
st8.nta [r2]=loc0,16 // b0
+#endif
st8.nta [r3]=r17,16 // b1
mov out1=in1
;;
@@ -169,7 +180,12 @@ ENTRY(__sigsetjmp)
;;
st8.nta [r2]=r25 // ar.unat
st8.nta [r3]=in0 // &__jmp_buf
+#if defined NOT_IN_libc && defined IS_IN_rtld
+ /* In ld.so we never save the signal mask. */
+ ;;
+#else
br.call.dpnt.few rp=__sigjmp_save
+#endif
.ret0: // force a new bundle ::q
mov.m ar.unat=loc2 // restore caller's unat
mov rp=loc0
diff --git a/sysdeps/unix/sysv/linux/ia64/sigaction.c b/sysdeps/unix/sysv/linux/ia64/sigaction.c
index 6ec3cb1e61..fdbc93f0ed 100644
--- a/sysdeps/unix/sysv/linux/ia64/sigaction.c
+++ b/sysdeps/unix/sysv/linux/ia64/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2000,2002,2003,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Linux/IA64 specific sigaction
Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
@@ -48,6 +48,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_def (__sigaction)
diff --git a/sysdeps/unix/sysv/linux/ia64/sigsuspend.c b/sysdeps/unix/sysv/linux/ia64/sigsuspend.c
deleted file mode 100644
index f8f9563494..0000000000
--- a/sysdeps/unix/sysv/linux/ia64/sigsuspend.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 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>
-#include <bp-checks.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, CHECK_SIGSET (set), _NSIG / 8);
-
- int oldtype = LIBC_CANCEL_ASYNC ();
-
- int result = INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8);
-
- LIBC_CANCEL_RESET (oldtype);
-
- return result;
-}
-libc_hidden_def (__sigsuspend)
-weak_alias (__sigsuspend, sigsuspend)
-strong_alias (__sigsuspend, __libc_sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
index 986c4b2d33..ff77627a83 100644
--- a/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux/ia64 version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 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
@@ -75,14 +75,6 @@ enum __ptrace_request
PTRACE_SINGLEBLOCK = 12,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
- /* Get siginfo for process. */
- PTRACE_GETSIGINFO = 13,
-#define PT_GETSIGINFO PTRACE_GETSIGINFO
-
- /* Set new siginfo for process. */
- PTRACE_SETSIGINFO = 14,
-#define PT_GETSIGINFO PTRACE_GETSIGINFO
-
/* Attach to a process that is already running. */
PTRACE_ATTACH = 16,
#define PT_ATTACH PTRACE_ATTACH
@@ -100,8 +92,24 @@ enum __ptrace_request
#define PT_SETREGS PTRACE_SETREGS
/* 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
};
/* pt_all_user_regs is used for PTRACE_GETREGS/PTRACE_SETREGS. */
diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
index 31c7718d8b..c55c70ef54 100644
--- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
@@ -2,7 +2,6 @@
umount2 - umount 2 __umount2 umount2
-getpeername - getpeername i:ipp __getpeername getpeername
getpriority - getpriority i:ii __getpriority getpriority
# semaphore and shm system calls
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index a4453ddcc7..dd7a5b1b1d 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
Based on code originally written by David Mosberger-Tang
@@ -204,7 +205,7 @@
register long _r8 __asm ("r8"); \
register long _r10 __asm ("r10"); \
register long _r15 __asm ("r15") = name; \
- register void *_b7 __asm ("b7") = ((tcbhead_t *) __thread_self)->private; \
+ register void *_b7 __asm ("b7") = ((tcbhead_t *)__thread_self)->__private;\
long _retval; \
LOAD_REGS_##nr \
/* \
@@ -360,4 +361,24 @@
#endif /* not __ASSEMBLER__ */
+/* 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
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(reg, tmpreg) \
+ add tmpreg=-16,r13 \
+ ;; \
+ ld8 tmpreg=[tmpreg] \
+ ;; \
+ xor reg=reg, 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/ia64/sysdep.h */