diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/nios2')
39 files changed, 564 insertions, 289 deletions
diff --git a/sysdeps/unix/sysv/linux/nios2/Makefile b/sysdeps/unix/sysv/linux/nios2/Makefile index d0af9ec559..5688a16c38 100644 --- a/sysdeps/unix/sysv/linux/nios2/Makefile +++ b/sysdeps/unix/sysv/linux/nios2/Makefile @@ -3,11 +3,7 @@ gen-as-const-headers += ucontext_i.sym endif ifeq ($(subdir),misc) -# MIPS/Tile-style cacheflush routine +# MIPS-style cacheflush routine sysdep_headers += sys/cachectl.h sysdep_routines += cacheflush endif - -ifeq ($(subdir),nptl) -libpthread-routines := $(filter-out pt-vfork,$(libpthread-routines)) -endif diff --git a/sysdeps/unix/sysv/linux/nios2/arch-fork.h b/sysdeps/unix/sysv/linux/nios2/arch-fork.h deleted file mode 100644 index 41ff5f08cd..0000000000 --- a/sysdeps/unix/sysv/linux/nios2/arch-fork.h +++ /dev/null @@ -1,33 +0,0 @@ -/* ARCH_FORK definition for Linux fork implementation. Nios II version. - Copyright (C) 2005-2016 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, see - <http://www.gnu.org/licenses/>. */ - -#include <sched.h> -#include <signal.h> -#include <sysdep.h> -#include <tls.h> - -/* Argument 1 - Clone flags. - 2 - Child stack pointer. - 3 - Parent tid pointer. - 4 - Child tid pointer. - 5 - New TLS area pointer. */ - -#define ARCH_FORK() \ - INLINE_SYSCALL (clone, 5, \ - CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \ - NULL, NULL, &THREAD_SELF->tid, NULL) diff --git a/sysdeps/unix/sysv/linux/nios2/atomic-machine.h b/sysdeps/unix/sysv/linux/nios2/atomic-machine.h index e246dee578..32e17fb970 100644 --- a/sysdeps/unix/sysv/linux/nios2/atomic-machine.h +++ b/sysdeps/unix/sysv/linux/nios2/atomic-machine.h @@ -1,5 +1,5 @@ /* Low-level functions for atomic operations. Nios II version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 @@ -34,6 +34,9 @@ typedef uintmax_t uatomic_max_t; #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 +/* XXX Is this actually correct? */ +#define ATOMIC_EXCHANGE_USES_CAS 1 + #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ (abort (), (__typeof (*mem)) 0) #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ diff --git a/sysdeps/unix/sysv/linux/nios2/bits/mman.h b/sysdeps/unix/sysv/linux/nios2/bits/mman.h index 43a3ff8070..50f92b4a86 100644 --- a/sysdeps/unix/sysv/linux/nios2/bits/mman.h +++ b/sysdeps/unix/sysv/linux/nios2/bits/mman.h @@ -1,6 +1,6 @@ /* Definitions for POSIX memory map interface. Linux/Nios II version. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -36,6 +36,10 @@ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_SYNC 0x80000 /* Perform synchronous page + faults for the mapping. */ +# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap + underlying mapping. */ #endif /* Include generic Linux declarations. */ diff --git a/sysdeps/unix/sysv/linux/nios2/cacheflush.c b/sysdeps/unix/sysv/linux/nios2/cacheflush.c index 26ca8cfe9d..31a0bcc7e5 100644 --- a/sysdeps/unix/sysv/linux/nios2/cacheflush.c +++ b/sysdeps/unix/sysv/linux/nios2/cacheflush.c @@ -1,5 +1,5 @@ /* cacheflush system call for Nios II Linux. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/clone.S b/sysdeps/unix/sysv/linux/nios2/clone.S index 4da5c19a73..fd3be46645 100644 --- a/sysdeps/unix/sysv/linux/nios2/clone.S +++ b/sysdeps/unix/sysv/linux/nios2/clone.S @@ -1,5 +1,5 @@ /* clone() implementation for Nios II. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andrew Jenner <andrew@codesourcery.com>, 2008. @@ -25,9 +25,6 @@ #include <bits/errno.h> #include <tcb-offsets.h> -#define CLONE_VM 0x00000100 -#define CLONE_THREAD 0x00010000 - /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, void *parent_tidptr, void *tls, void *child_tidptr) */ @@ -69,18 +66,6 @@ thread_start: cfi_startproc cfi_undefined (ra) - /* We expect the argument registers to be preserved across system - calls and across task cloning, so flags should be in r4 here. */ - andhi r2, r4, %hi(CLONE_THREAD) - bne r2, zero, 2f - andi r3, r4, CLONE_VM - movi r2, -1 - bne r3, zero, 3f - DO_CALL (getpid, 0) -3: - stw r2, PID_OFFSET(r23) - stw r2, TID_OFFSET(r23) -2: ldw r5, 4(sp) /* Function pointer. */ ldw r4, 0(sp) /* Argument pointer. */ addi sp, sp, 8 @@ -88,20 +73,12 @@ thread_start: /* Call the user's function. */ callr r5 - /* _exit with the result. */ - mov r4, r2 -#ifdef PIC - nextpc r22 -1: movhi r8, %hiadj(_gp_got - 1b) - addi r8, r8, %lo(_gp_got - 1b) - add r22, r22, r8 - ldw r8, %call(HIDDEN_JUMPTARGET(_exit))(r22) - jmp r8 -#else - jmpi _exit -#endif + /* exit with the result. */ + movi r2, SYS_ify (exit) + trap cfi_endproc cfi_startproc PSEUDO_END (__clone) +libc_hidden_def (__clone) weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/nios2/getcontext.S b/sysdeps/unix/sysv/linux/nios2/getcontext.S index 339da3b77f..8b5490cf60 100644 --- a/sysdeps/unix/sysv/linux/nios2/getcontext.S +++ b/sysdeps/unix/sysv/linux/nios2/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/kernel-features.h b/sysdeps/unix/sysv/linux/nios2/ipc_priv.h index c90df5da2a..37c081c1b1 100644 --- a/sysdeps/unix/sysv/linux/nios2/kernel-features.h +++ b/sysdeps/unix/sysv/linux/nios2/ipc_priv.h @@ -1,8 +1,5 @@ -/* Set flags signalling availability of kernel features based on given - kernel version number. - - Copyright (C) 2009-2016 Free Software Foundation, Inc. - +/* Old SysV permission definition for Linux. Nios II version. + Copyright (C) 2017-2018 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,13 +16,6 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <linux/version.h> - -/* The minimum supported kernel version for Nios II is 3.19.0, - guaranteeing many kernel features. */ - -#define __ASSUME_ACCEPT4_SYSCALL 1 -#define __ASSUME_RECVMMSG_SYSCALL 1 -#define __ASSUME_SENDMMSG_SYSCALL 1 +#include <sys/ipc.h> /* For __key_t */ -#include_next <kernel-features.h> +#define __IPC_64 0x0 diff --git a/sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h new file mode 100644 index 0000000000..1cb9cab420 --- /dev/null +++ b/sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h @@ -0,0 +1,6 @@ +#define JMP_BUF_SIZE 172 +#define SIGJMP_BUF_SIZE 172 +#define JMP_BUF_ALIGN 4 +#define SIGJMP_BUF_ALIGN 4 +#define MASK_WAS_SAVED_OFFSET 40 +#define SAVED_MASK_OFFSET 44 diff --git a/sysdeps/unix/sysv/linux/nios2/kernel_rt_sigframe.h b/sysdeps/unix/sysv/linux/nios2/kernel_rt_sigframe.h index cedf5812b7..917088c52f 100644 --- a/sysdeps/unix/sysv/linux/nios2/kernel_rt_sigframe.h +++ b/sysdeps/unix/sysv/linux/nios2/kernel_rt_sigframe.h @@ -1,5 +1,5 @@ /* Linux kernel struct rt_sigframe declaration for Nios II. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 @@ -22,5 +22,5 @@ struct kernel_rt_sigframe { siginfo_t info; - struct ucontext uc; + ucontext_t uc; }; diff --git a/sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h b/sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h new file mode 100644 index 0000000000..4ada322104 --- /dev/null +++ b/sysdeps/unix/sysv/linux/nios2/kernel_sigaction.h @@ -0,0 +1,8 @@ +/* NIOS2 uses the generic Linux UAPI but defines SA_RESTORER. */ +#define SA_RESTORER 0x04000000 +#include <sysdeps/unix/sysv/linux/kernel_sigaction.h> + +#define SET_SA_RESTORER(kact, act) \ + (kact)->sa_restorer = (act)->sa_restorer +#define RESET_SA_RESTORER(act, kact) \ + (act)->sa_restorer = (kact)->sa_restorer diff --git a/sysdeps/unix/sysv/linux/nios2/ld.abilist b/sysdeps/unix/sysv/linux/nios2/ld.abilist index 389bdaa0cb..110f1039fa 100644 --- a/sysdeps/unix/sysv/linux/nios2/ld.abilist +++ b/sysdeps/unix/sysv/linux/nios2/ld.abilist @@ -1,5 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A -GLIBC_2.21 __libc_memalign F GLIBC_2.21 __libc_stack_end D 0x4 GLIBC_2.21 __stack_chk_guard D 0x4 GLIBC_2.21 __tls_get_addr F diff --git a/sysdeps/unix/sysv/linux/nios2/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/nios2/libBrokenLocale.abilist index 5acf5e6d61..f0210af954 100644 --- a/sysdeps/unix/sysv/linux/nios2/libBrokenLocale.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libBrokenLocale.abilist @@ -1,2 +1 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/nios2/libanl.abilist b/sysdeps/unix/sysv/linux/nios2/libanl.abilist index 04286b8fa1..6ff9c2d94e 100644 --- a/sysdeps/unix/sysv/linux/nios2/libanl.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libanl.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 gai_cancel F GLIBC_2.21 gai_error F GLIBC_2.21 gai_suspend F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index dff1ee9566..aab1c44e46 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 _Exit F GLIBC_2.21 _IO_2_1_stderr_ D 0x98 GLIBC_2.21 _IO_2_1_stdin_ D 0x98 @@ -2120,11 +2119,55 @@ GLIBC_2.21 xdrstdio_create F GLIBC_2.21 xencrypt F GLIBC_2.21 xprt_register F GLIBC_2.21 xprt_unregister F -GLIBC_2.22 GLIBC_2.22 A GLIBC_2.22 fmemopen F -GLIBC_2.23 GLIBC_2.23 A GLIBC_2.23 fts64_children F GLIBC_2.23 fts64_close F GLIBC_2.23 fts64_open F GLIBC_2.23 fts64_read F GLIBC_2.23 fts64_set F +GLIBC_2.24 quick_exit F +GLIBC_2.25 __explicit_bzero_chk F +GLIBC_2.25 explicit_bzero F +GLIBC_2.25 getentropy F +GLIBC_2.25 getrandom F +GLIBC_2.25 strfromd F +GLIBC_2.25 strfromf F +GLIBC_2.25 strfroml F +GLIBC_2.26 preadv2 F +GLIBC_2.26 preadv64v2 F +GLIBC_2.26 pwritev2 F +GLIBC_2.26 pwritev64v2 F +GLIBC_2.26 reallocarray F +GLIBC_2.27 copy_file_range F +GLIBC_2.27 glob F +GLIBC_2.27 glob64 F +GLIBC_2.27 memfd_create F +GLIBC_2.27 mlock2 F +GLIBC_2.27 pkey_alloc F +GLIBC_2.27 pkey_free F +GLIBC_2.27 pkey_get F +GLIBC_2.27 pkey_mprotect F +GLIBC_2.27 pkey_set F +GLIBC_2.27 strfromf32 F +GLIBC_2.27 strfromf32x F +GLIBC_2.27 strfromf64 F +GLIBC_2.27 strtof32 F +GLIBC_2.27 strtof32_l F +GLIBC_2.27 strtof32x F +GLIBC_2.27 strtof32x_l F +GLIBC_2.27 strtof64 F +GLIBC_2.27 strtof64_l F +GLIBC_2.27 wcstof32 F +GLIBC_2.27 wcstof32_l F +GLIBC_2.27 wcstof32x F +GLIBC_2.27 wcstof32x_l F +GLIBC_2.27 wcstof64 F +GLIBC_2.27 wcstof64_l F +GLIBC_2.28 fcntl F +GLIBC_2.28 fcntl64 F +GLIBC_2.28 renameat2 F +GLIBC_2.28 statx F +GLIBC_2.28 thrd_current F +GLIBC_2.28 thrd_equal F +GLIBC_2.28 thrd_sleep F +GLIBC_2.28 thrd_yield F diff --git a/sysdeps/unix/sysv/linux/nios2/libcrypt.abilist b/sysdeps/unix/sysv/linux/nios2/libcrypt.abilist index dae6b522ac..78a9a23dbd 100644 --- a/sysdeps/unix/sysv/linux/nios2/libcrypt.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libcrypt.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 crypt F GLIBC_2.21 crypt_r F GLIBC_2.21 encrypt F diff --git a/sysdeps/unix/sysv/linux/nios2/libdl.abilist b/sysdeps/unix/sysv/linux/nios2/libdl.abilist index ae62e3f80e..79573c93dc 100644 --- a/sysdeps/unix/sysv/linux/nios2/libdl.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libdl.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 dladdr F GLIBC_2.21 dladdr1 F GLIBC_2.21 dlclose F diff --git a/sysdeps/unix/sysv/linux/nios2/libm.abilist b/sysdeps/unix/sysv/linux/nios2/libm.abilist index ad02eff997..2ed649a655 100644 --- a/sysdeps/unix/sysv/linux/nios2/libm.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libm.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 _LIB_VERSION D 0x4 GLIBC_2.21 __acos_finite F GLIBC_2.21 __acosf_finite F @@ -367,8 +366,402 @@ GLIBC_2.21 y1l F GLIBC_2.21 yn F GLIBC_2.21 ynf F GLIBC_2.21 ynl F -GLIBC_2.23 GLIBC_2.23 A GLIBC_2.23 __signgam D 0x4 GLIBC_2.23 lgamma F GLIBC_2.23 lgammaf F GLIBC_2.23 lgammal F +GLIBC_2.24 nextdown F +GLIBC_2.24 nextdownf F +GLIBC_2.24 nextdownl F +GLIBC_2.24 nextup F +GLIBC_2.24 nextupf F +GLIBC_2.24 nextupl F +GLIBC_2.25 __iseqsig F +GLIBC_2.25 __iseqsigf F +GLIBC_2.25 canonicalize F +GLIBC_2.25 canonicalizef F +GLIBC_2.25 canonicalizel F +GLIBC_2.25 fegetmode F +GLIBC_2.25 fesetexcept F +GLIBC_2.25 fesetmode F +GLIBC_2.25 fetestexceptflag F +GLIBC_2.25 fmaxmag F +GLIBC_2.25 fmaxmagf F +GLIBC_2.25 fmaxmagl F +GLIBC_2.25 fminmag F +GLIBC_2.25 fminmagf F +GLIBC_2.25 fminmagl F +GLIBC_2.25 fromfp F +GLIBC_2.25 fromfpf F +GLIBC_2.25 fromfpl F +GLIBC_2.25 fromfpx F +GLIBC_2.25 fromfpxf F +GLIBC_2.25 fromfpxl F +GLIBC_2.25 getpayload F +GLIBC_2.25 getpayloadf F +GLIBC_2.25 getpayloadl F +GLIBC_2.25 llogb F +GLIBC_2.25 llogbf F +GLIBC_2.25 llogbl F +GLIBC_2.25 roundeven F +GLIBC_2.25 roundevenf F +GLIBC_2.25 roundevenl F +GLIBC_2.25 setpayload F +GLIBC_2.25 setpayloadf F +GLIBC_2.25 setpayloadl F +GLIBC_2.25 setpayloadsig F +GLIBC_2.25 setpayloadsigf F +GLIBC_2.25 setpayloadsigl F +GLIBC_2.25 totalorder F +GLIBC_2.25 totalorderf F +GLIBC_2.25 totalorderl F +GLIBC_2.25 totalordermag F +GLIBC_2.25 totalordermagf F +GLIBC_2.25 totalordermagl F +GLIBC_2.25 ufromfp F +GLIBC_2.25 ufromfpf F +GLIBC_2.25 ufromfpl F +GLIBC_2.25 ufromfpx F +GLIBC_2.25 ufromfpxf F +GLIBC_2.25 ufromfpxl F +GLIBC_2.27 acosf32 F +GLIBC_2.27 acosf32x F +GLIBC_2.27 acosf64 F +GLIBC_2.27 acoshf32 F +GLIBC_2.27 acoshf32x F +GLIBC_2.27 acoshf64 F +GLIBC_2.27 asinf32 F +GLIBC_2.27 asinf32x F +GLIBC_2.27 asinf64 F +GLIBC_2.27 asinhf32 F +GLIBC_2.27 asinhf32x F +GLIBC_2.27 asinhf64 F +GLIBC_2.27 atan2f32 F +GLIBC_2.27 atan2f32x F +GLIBC_2.27 atan2f64 F +GLIBC_2.27 atanf32 F +GLIBC_2.27 atanf32x F +GLIBC_2.27 atanf64 F +GLIBC_2.27 atanhf32 F +GLIBC_2.27 atanhf32x F +GLIBC_2.27 atanhf64 F +GLIBC_2.27 cabsf32 F +GLIBC_2.27 cabsf32x F +GLIBC_2.27 cabsf64 F +GLIBC_2.27 cacosf32 F +GLIBC_2.27 cacosf32x F +GLIBC_2.27 cacosf64 F +GLIBC_2.27 cacoshf32 F +GLIBC_2.27 cacoshf32x F +GLIBC_2.27 cacoshf64 F +GLIBC_2.27 canonicalizef32 F +GLIBC_2.27 canonicalizef32x F +GLIBC_2.27 canonicalizef64 F +GLIBC_2.27 cargf32 F +GLIBC_2.27 cargf32x F +GLIBC_2.27 cargf64 F +GLIBC_2.27 casinf32 F +GLIBC_2.27 casinf32x F +GLIBC_2.27 casinf64 F +GLIBC_2.27 casinhf32 F +GLIBC_2.27 casinhf32x F +GLIBC_2.27 casinhf64 F +GLIBC_2.27 catanf32 F +GLIBC_2.27 catanf32x F +GLIBC_2.27 catanf64 F +GLIBC_2.27 catanhf32 F +GLIBC_2.27 catanhf32x F +GLIBC_2.27 catanhf64 F +GLIBC_2.27 cbrtf32 F +GLIBC_2.27 cbrtf32x F +GLIBC_2.27 cbrtf64 F +GLIBC_2.27 ccosf32 F +GLIBC_2.27 ccosf32x F +GLIBC_2.27 ccosf64 F +GLIBC_2.27 ccoshf32 F +GLIBC_2.27 ccoshf32x F +GLIBC_2.27 ccoshf64 F +GLIBC_2.27 ceilf32 F +GLIBC_2.27 ceilf32x F +GLIBC_2.27 ceilf64 F +GLIBC_2.27 cexpf32 F +GLIBC_2.27 cexpf32x F +GLIBC_2.27 cexpf64 F +GLIBC_2.27 cimagf32 F +GLIBC_2.27 cimagf32x F +GLIBC_2.27 cimagf64 F +GLIBC_2.27 clog10f32 F +GLIBC_2.27 clog10f32x F +GLIBC_2.27 clog10f64 F +GLIBC_2.27 clogf32 F +GLIBC_2.27 clogf32x F +GLIBC_2.27 clogf64 F +GLIBC_2.27 conjf32 F +GLIBC_2.27 conjf32x F +GLIBC_2.27 conjf64 F +GLIBC_2.27 copysignf32 F +GLIBC_2.27 copysignf32x F +GLIBC_2.27 copysignf64 F +GLIBC_2.27 cosf32 F +GLIBC_2.27 cosf32x F +GLIBC_2.27 cosf64 F +GLIBC_2.27 coshf32 F +GLIBC_2.27 coshf32x F +GLIBC_2.27 coshf64 F +GLIBC_2.27 cpowf32 F +GLIBC_2.27 cpowf32x F +GLIBC_2.27 cpowf64 F +GLIBC_2.27 cprojf32 F +GLIBC_2.27 cprojf32x F +GLIBC_2.27 cprojf64 F +GLIBC_2.27 crealf32 F +GLIBC_2.27 crealf32x F +GLIBC_2.27 crealf64 F +GLIBC_2.27 csinf32 F +GLIBC_2.27 csinf32x F +GLIBC_2.27 csinf64 F +GLIBC_2.27 csinhf32 F +GLIBC_2.27 csinhf32x F +GLIBC_2.27 csinhf64 F +GLIBC_2.27 csqrtf32 F +GLIBC_2.27 csqrtf32x F +GLIBC_2.27 csqrtf64 F +GLIBC_2.27 ctanf32 F +GLIBC_2.27 ctanf32x F +GLIBC_2.27 ctanf64 F +GLIBC_2.27 ctanhf32 F +GLIBC_2.27 ctanhf32x F +GLIBC_2.27 ctanhf64 F +GLIBC_2.27 erfcf32 F +GLIBC_2.27 erfcf32x F +GLIBC_2.27 erfcf64 F +GLIBC_2.27 erff32 F +GLIBC_2.27 erff32x F +GLIBC_2.27 erff64 F +GLIBC_2.27 exp10f32 F +GLIBC_2.27 exp10f32x F +GLIBC_2.27 exp10f64 F +GLIBC_2.27 exp2f F +GLIBC_2.27 exp2f32 F +GLIBC_2.27 exp2f32x F +GLIBC_2.27 exp2f64 F +GLIBC_2.27 expf F +GLIBC_2.27 expf32 F +GLIBC_2.27 expf32x F +GLIBC_2.27 expf64 F +GLIBC_2.27 expm1f32 F +GLIBC_2.27 expm1f32x F +GLIBC_2.27 expm1f64 F +GLIBC_2.27 fabsf32 F +GLIBC_2.27 fabsf32x F +GLIBC_2.27 fabsf64 F +GLIBC_2.27 fdimf32 F +GLIBC_2.27 fdimf32x F +GLIBC_2.27 fdimf64 F +GLIBC_2.27 floorf32 F +GLIBC_2.27 floorf32x F +GLIBC_2.27 floorf64 F +GLIBC_2.27 fmaf32 F +GLIBC_2.27 fmaf32x F +GLIBC_2.27 fmaf64 F +GLIBC_2.27 fmaxf32 F +GLIBC_2.27 fmaxf32x F +GLIBC_2.27 fmaxf64 F +GLIBC_2.27 fmaxmagf32 F +GLIBC_2.27 fmaxmagf32x F +GLIBC_2.27 fmaxmagf64 F +GLIBC_2.27 fminf32 F +GLIBC_2.27 fminf32x F +GLIBC_2.27 fminf64 F +GLIBC_2.27 fminmagf32 F +GLIBC_2.27 fminmagf32x F +GLIBC_2.27 fminmagf64 F +GLIBC_2.27 fmodf32 F +GLIBC_2.27 fmodf32x F +GLIBC_2.27 fmodf64 F +GLIBC_2.27 frexpf32 F +GLIBC_2.27 frexpf32x F +GLIBC_2.27 frexpf64 F +GLIBC_2.27 fromfpf32 F +GLIBC_2.27 fromfpf32x F +GLIBC_2.27 fromfpf64 F +GLIBC_2.27 fromfpxf32 F +GLIBC_2.27 fromfpxf32x F +GLIBC_2.27 fromfpxf64 F +GLIBC_2.27 getpayloadf32 F +GLIBC_2.27 getpayloadf32x F +GLIBC_2.27 getpayloadf64 F +GLIBC_2.27 hypotf32 F +GLIBC_2.27 hypotf32x F +GLIBC_2.27 hypotf64 F +GLIBC_2.27 ilogbf32 F +GLIBC_2.27 ilogbf32x F +GLIBC_2.27 ilogbf64 F +GLIBC_2.27 j0f32 F +GLIBC_2.27 j0f32x F +GLIBC_2.27 j0f64 F +GLIBC_2.27 j1f32 F +GLIBC_2.27 j1f32x F +GLIBC_2.27 j1f64 F +GLIBC_2.27 jnf32 F +GLIBC_2.27 jnf32x F +GLIBC_2.27 jnf64 F +GLIBC_2.27 ldexpf32 F +GLIBC_2.27 ldexpf32x F +GLIBC_2.27 ldexpf64 F +GLIBC_2.27 lgammaf32 F +GLIBC_2.27 lgammaf32_r F +GLIBC_2.27 lgammaf32x F +GLIBC_2.27 lgammaf32x_r F +GLIBC_2.27 lgammaf64 F +GLIBC_2.27 lgammaf64_r F +GLIBC_2.27 llogbf32 F +GLIBC_2.27 llogbf32x F +GLIBC_2.27 llogbf64 F +GLIBC_2.27 llrintf32 F +GLIBC_2.27 llrintf32x F +GLIBC_2.27 llrintf64 F +GLIBC_2.27 llroundf32 F +GLIBC_2.27 llroundf32x F +GLIBC_2.27 llroundf64 F +GLIBC_2.27 log10f32 F +GLIBC_2.27 log10f32x F +GLIBC_2.27 log10f64 F +GLIBC_2.27 log1pf32 F +GLIBC_2.27 log1pf32x F +GLIBC_2.27 log1pf64 F +GLIBC_2.27 log2f F +GLIBC_2.27 log2f32 F +GLIBC_2.27 log2f32x F +GLIBC_2.27 log2f64 F +GLIBC_2.27 logbf32 F +GLIBC_2.27 logbf32x F +GLIBC_2.27 logbf64 F +GLIBC_2.27 logf F +GLIBC_2.27 logf32 F +GLIBC_2.27 logf32x F +GLIBC_2.27 logf64 F +GLIBC_2.27 lrintf32 F +GLIBC_2.27 lrintf32x F +GLIBC_2.27 lrintf64 F +GLIBC_2.27 lroundf32 F +GLIBC_2.27 lroundf32x F +GLIBC_2.27 lroundf64 F +GLIBC_2.27 modff32 F +GLIBC_2.27 modff32x F +GLIBC_2.27 modff64 F +GLIBC_2.27 nanf32 F +GLIBC_2.27 nanf32x F +GLIBC_2.27 nanf64 F +GLIBC_2.27 nearbyintf32 F +GLIBC_2.27 nearbyintf32x F +GLIBC_2.27 nearbyintf64 F +GLIBC_2.27 nextafterf32 F +GLIBC_2.27 nextafterf32x F +GLIBC_2.27 nextafterf64 F +GLIBC_2.27 nextdownf32 F +GLIBC_2.27 nextdownf32x F +GLIBC_2.27 nextdownf64 F +GLIBC_2.27 nextupf32 F +GLIBC_2.27 nextupf32x F +GLIBC_2.27 nextupf64 F +GLIBC_2.27 powf F +GLIBC_2.27 powf32 F +GLIBC_2.27 powf32x F +GLIBC_2.27 powf64 F +GLIBC_2.27 remainderf32 F +GLIBC_2.27 remainderf32x F +GLIBC_2.27 remainderf64 F +GLIBC_2.27 remquof32 F +GLIBC_2.27 remquof32x F +GLIBC_2.27 remquof64 F +GLIBC_2.27 rintf32 F +GLIBC_2.27 rintf32x F +GLIBC_2.27 rintf64 F +GLIBC_2.27 roundevenf32 F +GLIBC_2.27 roundevenf32x F +GLIBC_2.27 roundevenf64 F +GLIBC_2.27 roundf32 F +GLIBC_2.27 roundf32x F +GLIBC_2.27 roundf64 F +GLIBC_2.27 scalblnf32 F +GLIBC_2.27 scalblnf32x F +GLIBC_2.27 scalblnf64 F +GLIBC_2.27 scalbnf32 F +GLIBC_2.27 scalbnf32x F +GLIBC_2.27 scalbnf64 F +GLIBC_2.27 setpayloadf32 F +GLIBC_2.27 setpayloadf32x F +GLIBC_2.27 setpayloadf64 F +GLIBC_2.27 setpayloadsigf32 F +GLIBC_2.27 setpayloadsigf32x F +GLIBC_2.27 setpayloadsigf64 F +GLIBC_2.27 sincosf32 F +GLIBC_2.27 sincosf32x F +GLIBC_2.27 sincosf64 F +GLIBC_2.27 sinf32 F +GLIBC_2.27 sinf32x F +GLIBC_2.27 sinf64 F +GLIBC_2.27 sinhf32 F +GLIBC_2.27 sinhf32x F +GLIBC_2.27 sinhf64 F +GLIBC_2.27 sqrtf32 F +GLIBC_2.27 sqrtf32x F +GLIBC_2.27 sqrtf64 F +GLIBC_2.27 tanf32 F +GLIBC_2.27 tanf32x F +GLIBC_2.27 tanf64 F +GLIBC_2.27 tanhf32 F +GLIBC_2.27 tanhf32x F +GLIBC_2.27 tanhf64 F +GLIBC_2.27 tgammaf32 F +GLIBC_2.27 tgammaf32x F +GLIBC_2.27 tgammaf64 F +GLIBC_2.27 totalorderf32 F +GLIBC_2.27 totalorderf32x F +GLIBC_2.27 totalorderf64 F +GLIBC_2.27 totalordermagf32 F +GLIBC_2.27 totalordermagf32x F +GLIBC_2.27 totalordermagf64 F +GLIBC_2.27 truncf32 F +GLIBC_2.27 truncf32x F +GLIBC_2.27 truncf64 F +GLIBC_2.27 ufromfpf32 F +GLIBC_2.27 ufromfpf32x F +GLIBC_2.27 ufromfpf64 F +GLIBC_2.27 ufromfpxf32 F +GLIBC_2.27 ufromfpxf32x F +GLIBC_2.27 ufromfpxf64 F +GLIBC_2.27 y0f32 F +GLIBC_2.27 y0f32x F +GLIBC_2.27 y0f64 F +GLIBC_2.27 y1f32 F +GLIBC_2.27 y1f32x F +GLIBC_2.27 y1f64 F +GLIBC_2.27 ynf32 F +GLIBC_2.27 ynf32x F +GLIBC_2.27 ynf64 F +GLIBC_2.28 daddl F +GLIBC_2.28 ddivl F +GLIBC_2.28 dmull F +GLIBC_2.28 dsubl F +GLIBC_2.28 f32addf32x F +GLIBC_2.28 f32addf64 F +GLIBC_2.28 f32divf32x F +GLIBC_2.28 f32divf64 F +GLIBC_2.28 f32mulf32x F +GLIBC_2.28 f32mulf64 F +GLIBC_2.28 f32subf32x F +GLIBC_2.28 f32subf64 F +GLIBC_2.28 f32xaddf64 F +GLIBC_2.28 f32xdivf64 F +GLIBC_2.28 f32xmulf64 F +GLIBC_2.28 f32xsubf64 F +GLIBC_2.28 fadd F +GLIBC_2.28 faddl F +GLIBC_2.28 fdiv F +GLIBC_2.28 fdivl F +GLIBC_2.28 fmul F +GLIBC_2.28 fmull F +GLIBC_2.28 fsub F +GLIBC_2.28 fsubl F diff --git a/sysdeps/unix/sysv/linux/nios2/libnsl.abilist b/sysdeps/unix/sysv/linux/nios2/libnsl.abilist index 40856aba99..9a3bbb310d 100644 --- a/sysdeps/unix/sysv/linux/nios2/libnsl.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libnsl.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 __free_fdresult F GLIBC_2.21 __nis_default_access F GLIBC_2.21 __nis_default_group F diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist index a10bbdec87..78cac2ae27 100644 --- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 _IO_flockfile F GLIBC_2.21 _IO_ftrylockfile F GLIBC_2.21 _IO_funlockfile F @@ -221,3 +220,24 @@ GLIBC_2.21 tcdrain F GLIBC_2.21 wait F GLIBC_2.21 waitpid F GLIBC_2.21 write F +GLIBC_2.28 call_once F +GLIBC_2.28 cnd_broadcast F +GLIBC_2.28 cnd_destroy F +GLIBC_2.28 cnd_init F +GLIBC_2.28 cnd_signal F +GLIBC_2.28 cnd_timedwait F +GLIBC_2.28 cnd_wait F +GLIBC_2.28 mtx_destroy F +GLIBC_2.28 mtx_init F +GLIBC_2.28 mtx_lock F +GLIBC_2.28 mtx_timedlock F +GLIBC_2.28 mtx_trylock F +GLIBC_2.28 mtx_unlock F +GLIBC_2.28 thrd_create F +GLIBC_2.28 thrd_detach F +GLIBC_2.28 thrd_exit F +GLIBC_2.28 thrd_join F +GLIBC_2.28 tss_create F +GLIBC_2.28 tss_delete F +GLIBC_2.28 tss_get F +GLIBC_2.28 tss_set F diff --git a/sysdeps/unix/sysv/linux/nios2/libresolv.abilist b/sysdeps/unix/sysv/linux/nios2/libresolv.abilist index b006fcafe7..2a2bec433f 100644 --- a/sysdeps/unix/sysv/linux/nios2/libresolv.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libresolv.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 __b64_ntop F GLIBC_2.21 __b64_pton F GLIBC_2.21 __dn_comp F diff --git a/sysdeps/unix/sysv/linux/nios2/librt.abilist b/sysdeps/unix/sysv/linux/nios2/librt.abilist index 51b1c5bc03..b4ae7a2dc2 100644 --- a/sysdeps/unix/sysv/linux/nios2/librt.abilist +++ b/sysdeps/unix/sysv/linux/nios2/librt.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 __mq_open_2 F GLIBC_2.21 aio_cancel F GLIBC_2.21 aio_cancel64 F diff --git a/sysdeps/unix/sysv/linux/nios2/libthread_db.abilist b/sysdeps/unix/sysv/linux/nios2/libthread_db.abilist index 96be90f65b..cb9e543f0e 100644 --- a/sysdeps/unix/sysv/linux/nios2/libthread_db.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libthread_db.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 td_init F GLIBC_2.21 td_log F GLIBC_2.21 td_symbol_list F diff --git a/sysdeps/unix/sysv/linux/nios2/libutil.abilist b/sysdeps/unix/sysv/linux/nios2/libutil.abilist index 0c21934dc0..19608bd74d 100644 --- a/sysdeps/unix/sysv/linux/nios2/libutil.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libutil.abilist @@ -1,4 +1,3 @@ -GLIBC_2.21 GLIBC_2.21 A GLIBC_2.21 forkpty F GLIBC_2.21 login F GLIBC_2.21 login_tty F diff --git a/sysdeps/unix/sysv/linux/nios2/localplt.data b/sysdeps/unix/sysv/linux/nios2/localplt.data index 08c88dc9c0..4430a5891e 100644 --- a/sysdeps/unix/sysv/linux/nios2/localplt.data +++ b/sysdeps/unix/sysv/linux/nios2/localplt.data @@ -1,11 +1,10 @@ libc.so: realloc -libc.so: __eqsf2 libc.so: __floatsisf -libc.so: __gtdf2 +libc.so: __gtdf2 ? libc.so: __ltdf2 libc.so: __gedf2 libc.so: malloc -libc.so: __gtsf2 +libc.so: __gtsf2 ? libc.so: __nesf2 libc.so: memalign libc.so: __mulsf3 @@ -13,10 +12,10 @@ libc.so: __floatunsisf libc.so: __addsf3 libc.so: __fixsfsi libc.so: __subsf3 -libc.so: __unorddf2 +libc.so: __unorddf2 ? libc.so: calloc libc.so: __muldf3 -libc.so: __unordsf2 +libc.so: __unordsf2 ? libc.so: free libc.so: __subdf3 libc.so: __ledf2 @@ -26,12 +25,16 @@ libc.so: __floatsidf libc.so: __divsf3 libc.so: __nedf2 libc.so: __eqdf2 +libc.so: __extendsfdf2 libm.so: matherr -# The dynamic loader uses __libc_memalign internally to allocate aligned -# TLS storage. The other malloc family of functions are expected to allow -# user symbol interposition. -ld.so: __libc_memalign +# The main malloc is interposed into the dynamic linker, for +# allocations after the initial link (when dlopen is used). ld.so: malloc ld.so: calloc ld.so: realloc ld.so: free +# The TLS-enabled version of these functions is interposed from libc.so. +ld.so: _dl_signal_error +ld.so: _dl_catch_error +ld.so: _dl_signal_exception +ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/nios2/makecontext.c b/sysdeps/unix/sysv/linux/nios2/makecontext.c index 93f1b777e8..e59fbafc97 100644 --- a/sysdeps/unix/sysv/linux/nios2/makecontext.c +++ b/sysdeps/unix/sysv/linux/nios2/makecontext.c @@ -1,5 +1,5 @@ /* Create new context. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/pt-vfork.S b/sysdeps/unix/sysv/linux/nios2/pt-vfork.S new file mode 100644 index 0000000000..147427a42d --- /dev/null +++ b/sysdeps/unix/sysv/linux/nios2/pt-vfork.S @@ -0,0 +1 @@ +# Nios2 does not require a stub for vfork in libpthread. diff --git a/sysdeps/unix/sysv/linux/nios2/setcontext.S b/sysdeps/unix/sysv/linux/nios2/setcontext.S index f10e8ffc0f..5e82bc99bb 100644 --- a/sysdeps/unix/sysv/linux/nios2/setcontext.S +++ b/sysdeps/unix/sysv/linux/nios2/setcontext.S @@ -1,5 +1,5 @@ /* Set current context. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 @@ -85,6 +85,18 @@ ENTRY(__setcontext) PSEUDO_END (__setcontext) weak_alias (__setcontext, setcontext) + /* We add an NOP here to separate between __setcontext/__startcontext. + The wanted behavior that happens is: when unwinding from a function + called inside a makecontext() context, FDE lookup will use + '&__startcontext - 1', then returns NULL for no FDE found, + and immediately ends the unwind, in a normal fashion. + + If this NOP word does not exist, FDE lookup just repeatedly finds + __setcontext's FDE in an infinite loop, due to the convention of + using 'address - 1' for FDE lookup. Modifiying/deleting the below + __startcontext's FDE has no help on this. */ + nop + ENTRY(__startcontext) mov r4, r16 bne r4, zero, __setcontext diff --git a/sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h b/sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h index 1e604c94cb..57b9b50e96 100644 --- a/sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h @@ -1,5 +1,5 @@ /* Nios II definitions for signal handling calling conventions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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,7 +19,7 @@ #include <sys/ucontext.h> #include "kernel-features.h" -#define SIGCONTEXT siginfo_t *_si, struct ucontext * +#define SIGCONTEXT siginfo_t *_si, ucontext_t * #define GET_PC(ctx) ((void *) (ctx)->uc_mcontext.regs[27]) /* There is no reliable way to get the sigcontext unless we use a diff --git a/sysdeps/unix/sysv/linux/nios2/swapcontext.S b/sysdeps/unix/sysv/linux/nios2/swapcontext.S index c24dd126b4..1cd6576de1 100644 --- a/sysdeps/unix/sysv/linux/nios2/swapcontext.S +++ b/sysdeps/unix/sysv/linux/nios2/swapcontext.S @@ -1,5 +1,5 @@ /* Modify saved context. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h b/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h index 717e6ae843..1bc9eeffba 100644 --- a/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h +++ b/sysdeps/unix/sysv/linux/nios2/sys/cachectl.h @@ -1,5 +1,5 @@ /* cacheflush - flush contents of instruction and/or data cache. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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,9 +21,6 @@ #include <features.h> -/* Get the kernel definition for the op bits. */ -#include <asm/cachectl.h> - __BEGIN_DECLS #ifdef __USE_MISC diff --git a/sysdeps/unix/sysv/linux/nios2/sys/procfs.h b/sysdeps/unix/sysv/linux/nios2/sys/procfs.h index b0ccd9f357..a61fe96c6b 100644 --- a/sysdeps/unix/sysv/linux/nios2/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/nios2/sys/procfs.h @@ -1,5 +1,5 @@ /* Core image file related definitions, Nios II version. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h b/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h index a44ec61fa0..188a004ac2 100644 --- a/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h @@ -1,5 +1,5 @@ -/* struct ucontext definition, Nios II version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. +/* ucontext_t definition, Nios II version. + Copyright (C) 2015-2018 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 @@ -22,27 +22,40 @@ #define _SYS_UCONTEXT_H 1 #include <features.h> -#include <signal.h> + +#include <bits/types/sigset_t.h> +#include <bits/types/stack_t.h> + /* These definitions must be in sync with the kernel. */ -#define MCONTEXT_VERSION 2 +#ifdef __USE_MISC +# define MCONTEXT_VERSION 2 +#endif + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif /* Context to describe whole processor state. */ -typedef struct mcontext +typedef struct { - int version; - unsigned long regs[32]; + int __ctx(version); + unsigned long __ctx(regs)[32]; } mcontext_t; /* Userlevel context. */ -typedef struct ucontext +typedef struct ucontext_t { - unsigned long uc_flags; - struct ucontext *uc_link; + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; - __sigset_t uc_sigmask; + sigset_t uc_sigmask; } ucontext_t; +#undef __ctx + #endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/nios2/sys/user.h b/sysdeps/unix/sysv/linux/nios2/sys/user.h index 1c042a852d..cddb960919 100644 --- a/sysdeps/unix/sysv/linux/nios2/sys/user.h +++ b/sysdeps/unix/sysv/linux/nios2/sys/user.h @@ -1,5 +1,5 @@ /* ptrace register data format definitions. - Copyright (C) 1998-2016 Free Software Foundation, Inc. + Copyright (C) 1998-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/syscall.S b/sysdeps/unix/sysv/linux/nios2/syscall.S index 51b6d46aaf..a0298fc47d 100644 --- a/sysdeps/unix/sysv/linux/nios2/syscall.S +++ b/sysdeps/unix/sysv/linux/nios2/syscall.S @@ -1,5 +1,5 @@ /* syscall - indirect system call. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h b/sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h deleted file mode 100644 index 8bd9e6bc68..0000000000 --- a/sysdeps/unix/sysv/linux/nios2/sysdep-cancel.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Assembler macros with cancellation support, Nios II version. - Copyright (C) 2003-2016 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, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <tls.h> -#ifndef __ASSEMBLER__ -# include <nptl/pthreadP.h> -#endif - -#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .type __##syscall_name##_nocancel, @function; \ - .globl __##syscall_name##_nocancel; \ - __##syscall_name##_nocancel: \ - cfi_startproc; \ - DO_CALL (syscall_name, args); \ - bne r7, zero, SYSCALL_ERROR_LABEL; \ - ret; \ - cfi_endproc; \ - .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ - ENTRY (name) \ - SINGLE_THREAD_P(r2); \ - bne r2, zero, pseudo_cancel; \ - DO_CALL (syscall_name, args); \ - bne r7, zero, SYSCALL_ERROR_LABEL; \ - ret; \ - pseudo_cancel: \ - SAVESTK_##args; /* save syscall args and adjust stack */ \ - SAVEREG(ra, 0); /* save return address */ \ - SAVEREG(r22, 4); /* save GOT pointer */ \ - nextpc r22; \ -1: movhi r2, %hiadj(_gp_got - 1b); \ - addi r2, r2, %lo(_gp_got - 1b); \ - add r22, r22, r2; \ - CENABLE; \ - callr r3; \ - stw r2, 8(sp); /* save mask */ \ - LOADARGS_##args; \ - movi r2, SYS_ify(syscall_name); \ - trap; \ - stw r2, 12(sp); /* save syscall result */ \ - stw r7, 16(sp); /* save syscall error flag */ \ - ldw r4, 8(sp); /* pass mask as argument 1 */ \ - CDISABLE; \ - callr r3; \ - ldw r7, 16(sp); /* restore syscall error flag */ \ - ldw r2, 12(sp); /* restore syscall result */ \ - ldw ra, 0(sp); /* restore return address */ \ - ldw r22, 4(sp); /* restore GOT pointer */ \ - RESTORESTK_##args; \ - bne r7, zero, SYSCALL_ERROR_LABEL; - - -# undef PSEUDO_END -# define PSEUDO_END(sym) \ - SYSCALL_ERROR_HANDLER \ - END (sym) - -#define SAVEREG(REG, LOC) stw REG, LOC(sp); cfi_rel_offset (REG, LOC) -#define SAVESTK(X) subi sp, sp, X; cfi_adjust_cfa_offset(X) -#define SAVESTK_0 SAVESTK(20) -#define SAVEARG_1 SAVEREG(r4, 20) -#define SAVESTK_1 SAVESTK(24); SAVEARG_1 -#define SAVEARG_2 SAVEREG(r5, 24); SAVEARG_1 -#define SAVESTK_2 SAVESTK(28); SAVEARG_2 -#define SAVEARG_3 SAVEREG(r6, 28); SAVEARG_2 -#define SAVESTK_3 SAVESTK(32); SAVEARG_3 -#define SAVEARG_4 SAVEREG(r7, 32); SAVEARG_3 -#define SAVESTK_4 SAVESTK(36); SAVEARG_4 -#define SAVESTK_5 SAVESTK_4 -#define SAVESTK_6 SAVESTK_5 - -#define LOADARGS_0 -#define LOADARGS_1 ldw r4, 20(sp) -#define LOADARGS_2 LOADARGS_1; ldw r5, 24(sp) -#define LOADARGS_3 LOADARGS_2; ldw r6, 28(sp) -#define LOADARGS_4 LOADARGS_3; ldw r7, 32(sp) -#define LOADARGS_5 LOADARGS_4; ldw r8, 36(sp) -#define LOADARGS_6 LOADARGS_5; ldw r9, 40(sp) - -#define RESTORESTK(X) addi sp, sp, X; cfi_adjust_cfa_offset(-X) -#define RESTORESTK_0 RESTORESTK(20) -#define RESTORESTK_1 RESTORESTK(24) -#define RESTORESTK_2 RESTORESTK(28) -#define RESTORESTK_3 RESTORESTK(32) -#define RESTORESTK_4 RESTORESTK(36) -#define RESTORESTK_5 RESTORESTK(36) -#define RESTORESTK_6 RESTORESTK(36) - -# if IS_IN (libpthread) -# define CENABLE ldw r3, %call(__pthread_enable_asynccancel)(r22) -# define CDISABLE ldw r3, %call(__pthread_disable_asynccancel)(r22) -# elif IS_IN (librt) -# define CENABLE ldw r3, %call(__librt_enable_asynccancel)(r22) -# define CDISABLE ldw r3, %call(__librt_disable_asynccancel)(r22) -# elif IS_IN (libc) -# define CENABLE ldw r3, %call(__libc_enable_asynccancel)(r22) -# define CDISABLE ldw r3, %call(__libc_disable_asynccancel)(r22) -# else -# error Unsupported library -# endif - -# ifndef __ASSEMBLER__ -# define SINGLE_THREAD_P \ - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) \ - == 0, 1) -# else -# define SINGLE_THREAD_P(reg) \ - ldw reg, MULTIPLE_THREADS_OFFSET(r23) -#endif - -#elif !defined __ASSEMBLER__ - -# define SINGLE_THREAD_P 1 -# define NO_CANCELLATION 1 - -#endif - -#ifndef __ASSEMBLER__ -# define RTLD_SINGLE_THREAD_P \ - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0, 1) -#endif diff --git a/sysdeps/unix/sysv/linux/nios2/sysdep.S b/sysdeps/unix/sysv/linux/nios2/sysdep.S index 67e214a6ca..a481810192 100644 --- a/sysdeps/unix/sysv/linux/nios2/sysdep.S +++ b/sysdeps/unix/sysv/linux/nios2/sysdep.S @@ -1,5 +1,5 @@ /* Static library error handling code fragment for Nios II. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/unix/sysv/linux/nios2/sysdep.h b/sysdeps/unix/sysv/linux/nios2/sysdep.h index 0935fa26d5..2e18809603 100644 --- a/sysdeps/unix/sysv/linux/nios2/sysdep.h +++ b/sysdeps/unix/sysv/linux/nios2/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for Nios II. - Copyright (C) 2000-2016 Free Software Foundation, Inc. + Copyright (C) 2000-2018 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 @@ -140,6 +140,10 @@ /* In order to get __set_errno() definition in INLINE_SYSCALL. */ #include <errno.h> +/* Previously Nios2 used the generic version without the libc_hidden_def + which lead in a non existent __send symbol in libc.so. */ +# undef HAVE_INTERNAL_SEND_SYMBOL + /* Define a macro which expands into the inline wrapper code for a system call. */ #undef INLINE_SYSCALL diff --git a/sysdeps/unix/sysv/linux/nios2/vfork.S b/sysdeps/unix/sysv/linux/nios2/vfork.S index c1bb9c7134..8aa99e6e26 100644 --- a/sysdeps/unix/sysv/linux/nios2/vfork.S +++ b/sysdeps/unix/sysv/linux/nios2/vfork.S @@ -1,5 +1,5 @@ /* vfork for Nios II Linux. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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,20 +21,10 @@ ENTRY(__vfork) - ldw r6, PID_OFFSET(r23) - sub r7, zero, r6 - bne r7, zero, 2f - movhi r7, %hi(0x80000000) -2: - stw r7, PID_OFFSET(r23) - movi r4, 0x4111 /* (CLONE_VM | CLONE_VFORK | SIGCHLD) */ mov r5, zero DO_CALL (clone, 2) - beq r2, zero, 1f - stw r6, PID_OFFSET(r23) -1: bne r7, zero, SYSCALL_ERROR_LABEL ret |