aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/adjtime.c38
-rw-r--r--sysdeps/unix/sysv/linux/alpha/Makefile3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/adjtime.c202
-rw-r--r--sysdeps/unix/sysv/linux/alpha/adjtimex.S59
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/signum.h2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/getitimer.S14
-rw-r--r--sysdeps/unix/sysv/linux/alpha/getrusage.S14
-rw-r--r--sysdeps/unix/sysv/linux/alpha/gettimeofday.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/select.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/setitimer.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/settimeofday.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list13
-rw-r--r--sysdeps/unix/sysv/linux/alpha/utimes.S16
-rw-r--r--sysdeps/unix/sysv/linux/alpha/wait4.S20
14 files changed, 403 insertions, 42 deletions
diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c
index 748788c972..7e8d90b71e 100644
--- a/sysdeps/unix/sysv/linux/adjtime.c
+++ b/sysdeps/unix/sysv/linux/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 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
@@ -28,16 +28,36 @@
#define modes mode
#endif
-int
-__adjtime (itv, otv)
- const struct timeval *itv;
- struct timeval *otv;
+#ifndef TIMEVAL
+#define TIMEVAL timeval
+#endif
+
+#ifndef TIMEX
+#define TIMEX timex
+#endif
+
+#ifndef ADJTIME
+#define ADJTIME __adjtime
+#endif
+
+#ifndef ADJTIMEX
+#define ADJTIMEX(x) __adjtimex (x)
+#endif
+
+#ifndef LINKAGE
+#define LINKAGE
+#endif
+
+LINKAGE int
+ADJTIME (itv, otv)
+ const struct TIMEVAL *itv;
+ struct TIMEVAL *otv;
{
- struct timex tntx;
+ struct TIMEX tntx;
if (itv)
{
- struct timeval tmp;
+ struct TIMEVAL tmp;
/* We will do some check here. */
tmp.tv_sec = itv->tv_sec + itv->tv_usec / 1000000L;
@@ -53,7 +73,7 @@ __adjtime (itv, otv)
else
tntx.modes = 0;
- if (__adjtimex (&tntx) < 0) return -1;
+ if (ADJTIMEX (&tntx) < 0) return -1;
if (otv)
{
@@ -71,4 +91,6 @@ __adjtime (itv, otv)
return 0;
}
+#ifndef ADJTIME
weak_alias (__adjtime, adjtime)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 48f5562d29..7821e46deb 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -7,6 +7,5 @@ sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
# Support old timeval32 entry points
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
osf_getitimer osf_setitimer osf_utimes \
- osf_getrusage osf_wait4
-
+ osf_getrusage osf_wait4 old_adjtimex
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
new file mode 100644
index 0000000000..f7df5fcc80
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -0,0 +1,202 @@
+/* Copyright (C) 1998 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+struct timeval32
+{
+ int tv_sec, tv_usec;
+};
+
+struct timex32 {
+ unsigned int modes; /* mode selector */
+ long offset; /* time offset (usec) */
+ long freq; /* frequency offset (scaled ppm) */
+ long maxerror; /* maximum error (usec) */
+ long esterror; /* estimated error (usec) */
+ int status; /* clock command/status */
+ long constant; /* pll time constant */
+ long precision; /* clock precision (usec) (read only) */
+ long tolerance; /* clock frequency tolerance (ppm)
+ * (read only)
+ */
+ struct timeval32 time; /* (read only) */
+ long tick; /* (modified) usecs between clock ticks */
+
+ long ppsfreq; /* pps frequency (scaled ppm) (ro) */
+ long jitter; /* pps jitter (us) (ro) */
+ int shift; /* interval duration (s) (shift) (ro) */
+ long stabil; /* pps stability (scaled ppm) (ro) */
+ long jitcnt; /* jitter limit exceeded (ro) */
+ long calcnt; /* calibration intervals (ro) */
+ long errcnt; /* calibration errors (ro) */
+ long stbcnt; /* stability limit exceeded (ro) */
+
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+};
+
+#define TIMEVAL timeval32
+#define TIMEX timex32
+#define ADJTIME __adjtime_tv32
+#define ADJTIMEX(x) __adjtimex_tv32 (x)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define LINKAGE
+#else
+#define LINKAGE static
+#endif
+
+LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
+extern int ADJTIMEX (struct TIMEX *);
+
+#include <sysdeps/unix/sysv/linux/adjtime.c>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+symbol_version (__adjtime_tv32, adjtime, GLIBC_2.0);
+#endif
+
+#undef TIMEVAL
+#define TIMEVAL timeval
+#undef TIMEX
+#define TIMEX timex
+#undef ADJTIME
+#define ADJTIME __adjtime_tv64
+#undef ADJTIMEX
+#define ADJTIMEX(x) __syscall_adjtimex_tv64 (x)
+#undef LINKAGE
+#define LINKAGE static
+
+LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
+extern int ADJTIMEX (struct TIMEX *);
+
+#include <sysdeps/unix/sysv/linux/adjtime.c>
+static int missing_adjtimex = 0;
+
+int
+__adjtime (itv, otv)
+ const struct timeval *itv;
+ struct timeval *otv;
+{
+ int ret;
+
+ if (!missing_adjtimex)
+ {
+ ret = __adjtime_tv64 (itv, otv);
+ if (ret && errno == ENOSYS)
+ missing_adjtimex = 1;
+ }
+
+ if (missing_adjtimex)
+ {
+ struct timeval32 itv32, otv32;
+
+ itv32.tv_sec = itv->tv_sec;
+ itv32.tv_usec = itv->tv_usec;
+ ret = __adjtime_tv32 (&itv32, &otv32);
+ if (ret == 0)
+ {
+ otv->tv_sec = otv32.tv_sec;
+ otv->tv_usec = otv32.tv_usec;
+ }
+ }
+
+ return ret;
+}
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+default_symbol_version (__adjtime, adjtime, GLIBC_2.1);
+#else
+weak_alias (__adjtime, adjtime);
+#endif
+
+extern int __syscall_adjtimex_tv64 (struct timex *tx);
+
+int
+__adjtimex_tv64 (tx)
+ struct timex *tx;
+{
+ int ret;
+
+ if (!missing_adjtimex)
+ {
+ ret = __syscall_adjtimex_tv64 (tx);
+ if (ret && errno == ENOSYS)
+ missing_adjtimex = 1;
+ }
+
+ if (missing_adjtimex)
+ {
+ struct timex32 tx32;
+
+ tx32.modes = tx->modes;
+ tx32.offset = tx->offset;
+ tx32.freq = tx->freq;
+ tx32.maxerror = tx->maxerror;
+ tx32.esterror = tx->esterror;
+ tx32.status = tx->status;
+ tx32.constant = tx->constant;
+ tx32.precision = tx->precision;
+ tx32.tolerance = tx->tolerance;
+ tx32.time.tv_sec = tx->time.tv_sec;
+ tx32.time.tv_sec = tx->time.tv_usec;
+ tx32.tick = tx->tick;
+ tx32.ppsfreq = tx->ppsfreq;
+ tx32.jitter = tx->jitter;
+ tx32.shift = tx->shift;
+ tx32.stabil = tx->stabil;
+ tx32.jitcnt = tx->jitcnt;
+ tx32.calcnt = tx->calcnt;
+ tx32.errcnt = tx->errcnt;
+ tx32.stbcnt = tx->stbcnt;
+
+ ret = __adjtimex_tv32 (&tx32);
+ if (ret == 0)
+ {
+ tx->modes = tx32.modes;
+ tx->offset = tx32.offset;
+ tx->freq = tx32.freq;
+ tx->maxerror = tx32.maxerror;
+ tx->esterror = tx32.esterror;
+ tx->status = tx32.status;
+ tx->constant = tx32.constant;
+ tx->precision = tx32.precision;
+ tx->tolerance = tx32.tolerance;
+ tx->time.tv_sec = tx32.time.tv_sec;
+ tx->time.tv_usec = tx32.time.tv_sec;
+ tx->tick = tx32.tick;
+ tx->ppsfreq = tx32.ppsfreq;
+ tx->jitter = tx32.jitter;
+ tx->shift = tx32.shift;
+ tx->stabil = tx32.stabil;
+ tx->jitcnt = tx32.jitcnt;
+ tx->calcnt = tx32.calcnt;
+ tx->errcnt = tx32.errcnt;
+ tx->stbcnt = tx32.stbcnt;
+ }
+ }
+
+ return ret;
+}
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
+default_symbol_version (__adjtimex_tv64, __adjtimex, GLIBC_2.1);
+default_symbol_version (__adjtimex_tv64p, adjtimex, GLIBC_2.1);
+#else
+weak_alias (__adjtimex_tv64, __adjtimex);
+weak_alias (__adjtimex_tv64, adjtimex);
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtimex.S b/sysdeps/unix/sysv/linux/alpha/adjtimex.S
new file mode 100644
index 0000000000..367b7358e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/adjtimex.S
@@ -0,0 +1,59 @@
+/* Copyright (C) 1998 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+.text
+
+LEAF(__syscall_adjtimex_tv64, 0)
+ ldgp gp, 0(pv)
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+#ifdef __NR_adjtimex
+ ldi v0, SYS_ify(adjtimex)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64:
+#else
+ /* ENOSYS. */
+ ldi v0, ENOSYS
+#endif
+ lda pv, __syscall_error
+ jmp zero, (pv), __syscall_error
+
+END(__syscall_adjtimex_tv64)
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index 6b1399eb12..05ffbae550 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -68,6 +68,6 @@
#define SIGPWR SIGINFO
#define SIGIOT SIGABRT
-#define _NSIG 32 /* Biggest signal number + 1. */
+#define _NSIG 64 /* Biggest signal number + 1. */
#endif /* <signal.h> included. */
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 03ae6ea491..9ba849fcac 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -32,7 +32,13 @@
.text
-LEAF(__getitimer_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETITIMER __getitimer_tv64
+#else
+#define GETITIMER getitimer
+#endif
+
+LEAF(GETITIMER, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__getitimer_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -94,6 +100,8 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__getitimer_tv64)
+END(GETITIMER)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index d875c83771..fbbe6f7931 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -32,7 +32,13 @@
.text
-LEAF(__getrusage_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETRUSAGE __getrusage_tv64
+#else
+#define GETRUSAGE getrusage
+#endif
+
+LEAF(GETRUSAGE, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__getrusage_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -122,6 +128,8 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__getrusage_tv64)
+END(GETRUSAGE)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index bceeefc0a7..6f7082f1b0 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -32,7 +32,13 @@
.text
-LEAF(__gettimeofday_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETTIMEOFDAY __gettimeofday_tv64
+#else
+#define GETTIMEOFDAY __gettimeofday
+#endif
+
+LEAF(GETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__gettimeofday_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -91,8 +97,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__gettimeofday_tv64)
+END(GETTIMEOFDAY)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -100,3 +107,6 @@ default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p)
default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1)
+#else
+weak_alias (__gettimeofday, gettimeofday)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 73076b9158..c854f7fd30 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -32,7 +32,13 @@
.text
-LEAF(__select_tv64, 64)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SELECT __select_tv64
+#else
+#define SELECT __select
+#endif
+
+LEAF(SELECT, 64)
ldgp gp, 0(pv)
subq sp, 64, sp
#ifdef PROF
@@ -64,7 +70,7 @@ LEAF(__select_tv64, 64)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -105,8 +111,9 @@ $error:
addq sp, 64, sp
jmp zero, (pv), __syscall_error
-END(__select_tv64)
+END(SELECT)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__select_tv64, __select, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -114,3 +121,6 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__select_tv64, __select_tv64p)
default_symbol_version (__select_tv64p, select, GLIBC_2.1)
+#else
+weak_alias (__select, select)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index a2085cc29e..e57acc2020 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -32,7 +32,13 @@
.text
-LEAF(__setitimer_tv64, 48)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETITIMER __setitimer_tv64
+#else
+#define SETITIMER __setitimer
+#endif
+
+LEAF(SETITIMER, 48)
ldgp gp, 0(pv)
subq sp, 48, sp
#ifdef PROF
@@ -63,7 +69,7 @@ LEAF(__setitimer_tv64, 48)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -110,8 +116,9 @@ $error:
addq sp, 48, sp
jmp zero, (pv), __syscall_error
-END(__setitimer_tv64)
+END(SETITIMER)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -119,3 +126,6 @@ default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__setitimer_tv64, __setitimer_tv64p)
default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1)
+#else
+weak_alias (__setitimer, setitimer)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index b730df7136..ae129ecc1c 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -32,7 +32,13 @@
.text
-LEAF(__settimeofday_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETTIMEOFDAY __settimeofday_tv64
+#else
+#define SETTIMEOFDAY __settimeofday
+#endif
+
+LEAF(SETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -61,7 +67,7 @@ LEAF(__settimeofday_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -91,8 +97,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__settimeofday_tv64)
+END(SETTIMEOFDAY)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -100,3 +107,6 @@ default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__settimeofday_tv64, __settimeofday_tv64p)
default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1)
+#else
+weak_alias (__settimeofday, settimeofday)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 59c0cb8a09..26d4f15258 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -64,9 +64,10 @@ pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
# support old timeval32 entry points
osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
-osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0
-osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0
-osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0
-osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0
-osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0
-osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0
+osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 __settimeofday@GLIBC_2.0 settimeofday@GLIBC_2.0
+osf_getitimer - osf_getitimer 2 __getitimer_tv32 __getitimer@GLIBC_2.0 getitimer@GLIBC_2.0
+osf_setitimer - osf_setitimer 3 __setitimer_tv32 __setitimer@GLIBC_2.0 setitimer@GLIBC_2.0
+osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0
+osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0
+osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0
+old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index 2b4c71e410..a1d2b1513c 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -32,7 +32,13 @@
.text
-LEAF(__utimes_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define UTIMES __utimes_tv64
+#else
+#define UTIMES __utimes
+#endif
+
+LEAF(UTIMES, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__utimes_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -96,8 +102,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__utimes_tv64)
+END(UTIMES)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -105,3 +112,6 @@ default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__utimes_tv64, __utimes_tv64p)
default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1)
+#else
+weak_alias (__utimes, utimes)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index 5ab86077c8..334836f5aa 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -32,7 +32,13 @@
.text
-LEAF(__wait4_tv64, 32)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define WAIT4 __wait4_tv64
+#else
+#define WAIT4 __wait4
+#endif
+
+LEAF(WAIT4, 32)
ldgp gp, 0(pv)
subq sp, 32, sp
#ifdef PROF
@@ -64,7 +70,7 @@ LEAF(__wait4_tv64, 32)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -79,7 +85,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
bne a3, $error
/* Copy back to proper format. */
- ldq a3, 8(sp)
+ ldq a3, 24(sp)
beq a3, 2f
ldl t0, 0(a3) # ru_utime.tv_sec
ldl t1, 4(a3) # ru_utime.tv_usec
@@ -98,6 +104,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
ldt $f25, 96(a3) # ru_msgrcv
ldt $f26, 104(a3) # ru_nsignals
ldt $f27, 112(a3) # ru_nvcsw
+ .set noat
ldt $f28, 120(a3) # ru_nivcsw
stq t0, 0(a3)
stq t1, 8(a3)
@@ -117,6 +124,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
stt $f26, 120(a3)
stt $f27, 128(a3)
stt $f28, 136(a3)
+ .set at
2: addq sp, 32, sp
ret
@@ -127,8 +135,9 @@ $error:
addq sp, 32, sp
jmp zero, (pv), __syscall_error
-END(__wait4_tv64)
+END(WAIT4)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -136,3 +145,6 @@ default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__wait4_tv64, __wait4_tv64p)
default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1)
+#else
+weak_alias (__wait4, wait4)
+#endif