* [PATCH 06/21] ARC: Atomics and Locking primitives
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (7 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 23:23 ` Joseph Myers
2018-12-18 21:05 ` [PATCH 11/21] ARC: ABI lists Vineet Gupta
` (14 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 3 ++
sysdeps/arc/atomic-machine.h | 89 +++++++++++++++++++++++++++++++
sysdeps/arc/nptl/bits/pthreadtypes-arch.h | 72 +++++++++++++++++++++++++
sysdeps/arc/nptl/bits/semaphore.h | 32 +++++++++++
4 files changed, 196 insertions(+)
create mode 100644 sysdeps/arc/atomic-machine.h
create mode 100644 sysdeps/arc/nptl/bits/pthreadtypes-arch.h
create mode 100644 sysdeps/arc/nptl/bits/semaphore.h
diff --git a/ChangeLog b/ChangeLog
index 6e53b171a72d..d2f6cd2d0d09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,9 @@
* sysdeps/arc/nptl/tcb-offsets.sym: New file.
* sysdeps/arc/nptl/tls.h: New file.
* sysdeps/arc/stackinfo.h: New file.
+ * sysdeps/arc/atomic-machine.h: New file.
+ * sysdeps/arc/nptl/bits/pthreadtypes-arch.h: New file.
+ * sysdeps/arc/nptl/bits/semaphore.h: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/atomic-machine.h b/sysdeps/arc/atomic-machine.h
new file mode 100644
index 000000000000..1a8d976794d0
--- /dev/null
+++ b/sysdeps/arc/atomic-machine.h
@@ -0,0 +1,89 @@
+/* Low-level functions for atomic operations. ARC version.
+ 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
+ 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/>. */
+
+#ifndef _ARC_BITS_ATOMIC_H
+#define _ARC_BITS_ATOMIC_H 1
+
+#include <stdint.h>
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+#define __HAVE_64B_ATOMICS 0
+#define USE_ATOMIC_COMPILER_BUILTINS 0
+#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) \
+ (abort (), (__typeof (*mem)) 0)
+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
+ (abort (), (__typeof (*mem)) 0)
+
+#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \
+ (abort (), 0)
+#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
+ (abort (), 0)
+#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
+ (abort (), 0)
+
+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ \
+ __typeof(*(mem)) prev; \
+ \
+ __asm__ __volatile__( \
+ "1: llock %0, [%1] \n" \
+ " brne %0, %2, 2f \n" \
+ " scond %3, [%1] \n" \
+ " bnz 1b \n" \
+ "2: \n" \
+ : "=&r"(prev) \
+ : "r"(mem), "ir"(oldval), \
+ "r"(newval) /* can't be "ir". scond can't take limm for "b" */\
+ : "cc", "memory"); \
+ \
+ prev; \
+ })
+
+# define atomic_exchange_acq(mem, newvalue) \
+ ({ \
+ __typeof(*(mem)) __val = (newvalue); \
+ \
+ __asm__ __volatile__( \
+ "1: ex %0, [%1] \n" \
+ : "+r"(__val) \
+ : "r"(mem) \
+ : "memory"); \
+ \
+ __val; \
+ })
+
+#ifdef __ARC700__
+#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); })
+#else
+#define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); })
+#endif
+
+#endif /* _ARC_BITS_ATOMIC_H */
diff --git a/sysdeps/arc/nptl/bits/pthreadtypes-arch.h b/sysdeps/arc/nptl/bits/pthreadtypes-arch.h
new file mode 100644
index 000000000000..473d9ec2bf0d
--- /dev/null
+++ b/sysdeps/arc/nptl/bits/pthreadtypes-arch.h
@@ -0,0 +1,72 @@
+/* Machine-specific pthread type layouts. ARC version.
+ 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
+ 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/>. */
+
+#ifndef _BITS_PTHREADTYPES_ARCH_H
+#define _BITS_PTHREADTYPES_ARCH_H 1
+
+#include <endian.h>
+
+#define __SIZEOF_PTHREAD_ATTR_T 36
+#define __SIZEOF_PTHREAD_MUTEX_T 24
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCK_T 32
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIER_T 20
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+/* Data structure for mutex handling. */
+#define __PTHREAD_COMPAT_PADDING_MID
+#define __PTHREAD_COMPAT_PADDING_END
+#define __PTHREAD_MUTEX_LOCK_ELISION 0
+#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
+#define __PTHREAD_MUTEX_USE_UNION 1
+
+#define __LOCK_ALIGNMENT
+#define __ONCE_ALIGNMENT
+
+struct __pthread_rwlock_arch_t
+{
+ unsigned int __readers;
+ unsigned int __writers;
+ unsigned int __wrphase_futex;
+ unsigned int __writers_futex;
+ unsigned int __pad3;
+ unsigned int __pad4;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+#else
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
+ int __cur_writer;
+};
+
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
+#endif /* bits/pthreadtypes-arch.h */
diff --git a/sysdeps/arc/nptl/bits/semaphore.h b/sysdeps/arc/nptl/bits/semaphore.h
new file mode 100644
index 000000000000..1ecc8ab8a65b
--- /dev/null
+++ b/sysdeps/arc/nptl/bits/semaphore.h
@@ -0,0 +1,32 @@
+/* Machine-specific POSIX semaphore type layouts. ARC version.
+ Copyright (C) 2002-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
+ 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/>. */
+
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+#define __SIZEOF_SEM_T 16
+
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
+
+typedef union
+{
+ char __size[__SIZEOF_SEM_T];
+ long int __align;
+} sem_t;
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 02/21] ARC: add definitions to elf/elf.h
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (12 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 21/21] NEWS: mention ARC port Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints Vineet Gupta
` (9 subsequent siblings)
23 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 1 +
elf/elf.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 70 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 456e4b670c23..3ec6eb82d2fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* sysdeps/unix/make-syscalls.sh: Fix comment referencing
syscall-template file.
* stdlib/longlong.h: Fix asm constraints for ARC code.
+ * elf/elf.h: add defines for ARC.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/elf/elf.h b/elf/elf.h
index d57313e9bbc7..57d7c717784e 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -330,7 +330,7 @@ typedef struct
#define EM_CLOUDSHIELD 192 /* CloudShield */
#define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */
#define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */
-#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */
+#define EM_ARCV2 195 /* Synopsys ARCv2 ISA */
#define EM_OPEN8 196 /* Open8 RISC */
#define EM_RL78 197 /* Renesas RL78 */
#define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */
@@ -3996,6 +3996,74 @@ enum
#define R_NDS32_TLS_TPOFF 102
#define R_NDS32_TLS_DESC 119
+/* ARCompact/ARCv2 specific relocs */
+#define R_ARC_NONE 0x0
+#define R_ARC_8 0x1
+#define R_ARC_16 0x2
+#define R_ARC_24 0x3
+#define R_ARC_32 0x4
+#define R_ARC_B26 0x5
+#define R_ARC_B22_PCREL 0x6
+#define R_ARC_H30 0x7
+#define R_ARC_N8 0x8
+#define R_ARC_N16 0x9
+#define R_ARC_N24 0xA
+#define R_ARC_N32 0xB
+#define R_ARC_SDA 0xC
+#define R_ARC_SECTOFF 0xD
+#define R_ARC_S21H_PCREL 0xE
+#define R_ARC_S21W_PCREL 0xF
+#define R_ARC_S25H_PCREL 0x10
+#define R_ARC_S25W_PCREL 0x11
+#define R_ARC_SDA32 0x12
+#define R_ARC_SDA_LDST 0x13
+#define R_ARC_SDA_LDST1 0x14
+#define R_ARC_SDA_LDST2 0x15
+#define R_ARC_SDA16_LD 0x16
+#define R_ARC_SDA16_LD1 0x17
+#define R_ARC_SDA16_LD2 0x18
+#define R_ARC_S13_PCREL 0x19
+#define R_ARC_W 0x1A
+#define R_ARC_32_ME 0x1B
+#define R_ARC_N32_ME 0x1C
+#define R_ARC_SECTOFF_ME 0x1D
+#define R_ARC_SDA32_ME 0x1E
+#define R_ARC_W_ME 0x1F
+#define R_ARC_H30_ME 0x20
+#define R_ARC_SECTOFF_U8 0x21
+#define R_ARC_SECTOFF_S9 0x22
+#define R_AC_SECTOFF_U8 0x23
+#define R_AC_SECTOFF_U8_1 0x24
+#define R_AC_SECTOFF_U8_2 0x25
+#define R_AC_SECTOFF_S9 0x26
+#define R_AC_SECTOFF_S9_1 0x27
+#define R_AC_SECTOFF_S9_2 0x28
+#define R_ARC_SECTOFF_ME_1 0x29
+#define R_ARC_SECTOFF_ME_2 0x2A
+#define R_ARC_SECTOFF_1 0x2B
+#define R_ARC_SECTOFF_2 0x2C
+#define R_ARC_PC32 0x32
+#define R_ARC_GOTPC32 0x33
+#define R_ARC_PLT32 0x34
+#define R_ARC_COPY 0x35
+#define R_ARC_GLOB_DAT 0x36
+#define R_ARC_JUMP_SLOT 0x37
+#define R_ARC_RELATIVE 0x38
+#define R_ARC_GOTOFF 0x39
+#define R_ARC_GOTPC 0x3A
+#define R_ARC_GOT32 0x3B
+
+#define R_ARC_TLS_DTPMOD 0x42
+#define R_ARC_TLS_DTPOFF 0x43
+#define R_ARC_TLS_TPOFF 0x44
+#define R_ARC_TLS_GD_GOT 0x45
+#define R_ARC_TLS_GD_LD 0x46
+#define R_ARC_TLS_GD_CALL 0x47
+#define R_ARC_TLS_IE_GOT 0x48
+#define R_ARC_TLS_DTPOFF_S9 0x4a
+#define R_ARC_TLS_LE_S9 0x4a
+#define R_ARC_TLS_LE_32 0x4b
+
__END_DECLS
#endif /* elf.h */
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 16/21] ARC: testsuite fix: sysvipc/*
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-19 22:14 ` Adhemerval Zanella
2018-12-18 21:05 ` [PATCH 18/21] ARC: testsuite fix: GD TLS issue Vineet Gupta
` (22 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 1 +
sysdeps/unix/sysv/linux/arc/ipc_priv.h | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 sysdeps/unix/sysv/linux/arc/ipc_priv.h
diff --git a/ChangeLog b/ChangeLog
index 909b1af09a31..d3a979a9236b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -109,6 +109,7 @@
* sysdeps/arc/start.S: likewise.
* sysdeps/arc/entry.h: Add ENTRY_POINT define check.
* sysdeps/arc/crti.S: add .hidden annotations.
+ * sysdeps/unix/sysv/linux/arc/ipc_priv.h: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arc/ipc_priv.h b/sysdeps/unix/sysv/linux/arc/ipc_priv.h
new file mode 100644
index 000000000000..5f6e9815d169
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/ipc_priv.h
@@ -0,0 +1,21 @@
+/* Old SysV permission definition for Linux. ARC version.
+ Copyright (C) 2016-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
+ 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 <sys/ipc.h> /* For __key_t */
+
+#define __IPC_64 0x0
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 11/21] ARC: ABI lists
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (8 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 06/21] ARC: Atomics and Locking primitives Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 22:32 ` Andreas Schwab
2018-12-18 21:05 ` [PATCH 19/21] ARC: fix several unwining and cancelation tests Vineet Gupta
` (13 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 17 +
sysdeps/arc/nofpu/libm-test-ulps | 390 ++++
sysdeps/arc/nofpu/libm-test-ulps-name | 1 +
sysdeps/unix/sysv/linux/arc/c++-types.data | 67 +
sysdeps/unix/sysv/linux/arc/ld.abilist | 9 +
.../unix/sysv/linux/arc/libBrokenLocale.abilist | 1 +
sysdeps/unix/sysv/linux/arc/libanl.abilist | 4 +
sysdeps/unix/sysv/linux/arc/libc.abilist | 2089 ++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/libcrypt.abilist | 2 +
sysdeps/unix/sysv/linux/arc/libdl.abilist | 9 +
sysdeps/unix/sysv/linux/arc/libm.abilist | 753 +++++++
sysdeps/unix/sysv/linux/arc/libnsl.abilist | 120 ++
sysdeps/unix/sysv/linux/arc/libpthread.abilist | 235 +++
sysdeps/unix/sysv/linux/arc/libresolv.abilist | 79 +
sysdeps/unix/sysv/linux/arc/librt.abilist | 35 +
sysdeps/unix/sysv/linux/arc/libthread_db.abilist | 40 +
sysdeps/unix/sysv/linux/arc/libutil.abilist | 6 +
sysdeps/unix/sysv/linux/arc/localplt.data | 15 +
18 files changed, 3872 insertions(+)
create mode 100644 sysdeps/arc/nofpu/libm-test-ulps
create mode 100644 sysdeps/arc/nofpu/libm-test-ulps-name
create mode 100644 sysdeps/unix/sysv/linux/arc/c++-types.data
create mode 100644 sysdeps/unix/sysv/linux/arc/ld.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libanl.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libc.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libcrypt.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libdl.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libm.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libnsl.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libpthread.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libresolv.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/librt.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libthread_db.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libutil.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/localplt.data
diff --git a/ChangeLog b/ChangeLog
index f6ad5968d7de..4182e89ccbb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,23 @@
* sysdeps/unix/sysv/linux/arc/dl-static.c: New file.
* sysdeps/unix/sysv/linux/arc/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/arc/ldsodefs.h: New file.
+ * sysdeps/arc/nofpu/libm-test-ulps: New file.
+ * sysdeps/arc/nofpu/libm-test-ulps-name: New file.
+ * sysdeps/unix/sysv/linux/arc/c++-types.data: New file.
+ * sysdeps/unix/sysv/linux/arc/ld.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libanl.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libc.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libcrypt.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libdl.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libm.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libnsl.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libpthread.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libresolv.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/librt.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libthread_db.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/libutil.abilist: New file.
+ * sysdeps/unix/sysv/linux/arc/localplt.data: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/nofpu/libm-test-ulps b/sysdeps/arc/nofpu/libm-test-ulps
new file mode 100644
index 000000000000..0e8ef313fa94
--- /dev/null
+++ b/sysdeps/arc/nofpu/libm-test-ulps
@@ -0,0 +1,390 @@
+# Begin of automatic generation
+
+# Maximal error of functions:
+Function: "acos":
+float: 1
+ifloat: 1
+
+Function: "acosh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "asin":
+float: 1
+ifloat: 1
+
+Function: "asinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "atan":
+float: 1
+ifloat: 1
+
+Function: "atan2":
+float: 1
+ifloat: 1
+
+Function: "atanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "cabs":
+double: 1
+idouble: 1
+
+Function: Real part of "cacos":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "cacos":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "cacosh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "cacosh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "carg":
+float: 1
+ifloat: 1
+
+Function: Real part of "casin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "casin":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "casinh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "casinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catanh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "catanh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "cbrt":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: Real part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cexp":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Imaginary part of "cexp":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Real part of "clog":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+Function: Imaginary part of "clog":
+float: 1
+ifloat: 1
+
+Function: Real part of "clog10":
+double: 3
+float: 4
+idouble: 3
+ifloat: 4
+
+Function: Imaginary part of "clog10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "cos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "cosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cpow":
+double: 2
+float: 5
+idouble: 2
+ifloat: 5
+
+Function: Imaginary part of "cpow":
+float: 2
+ifloat: 2
+
+Function: Real part of "csin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "csqrt":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "ctanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "ctanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "erf":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "erfc":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "exp10":
+double: 2
+idouble: 2
+
+Function: "exp2":
+double: 1
+idouble: 1
+
+Function: "expm1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "gamma":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: "hypot":
+double: 1
+idouble: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "jn":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: "lgamma":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: "log10":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log1p":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log2":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "pow":
+double: 1
+idouble: 1
+
+Function: "sin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sinh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "tan":
+float: 1
+ifloat: 1
+
+Function: "tanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "tgamma":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "yn":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
+# end of automatic generation
diff --git a/sysdeps/arc/nofpu/libm-test-ulps-name b/sysdeps/arc/nofpu/libm-test-ulps-name
new file mode 100644
index 000000000000..8c4fba4f9ae0
--- /dev/null
+++ b/sysdeps/arc/nofpu/libm-test-ulps-name
@@ -0,0 +1 @@
+ARC
diff --git a/sysdeps/unix/sysv/linux/arc/c++-types.data b/sysdeps/unix/sysv/linux/arc/c++-types.data
new file mode 100644
index 000000000000..303f4570c8ee
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/c++-types.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:i
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/sysdeps/unix/sysv/linux/arc/ld.abilist b/sysdeps/unix/sysv/linux/arc/ld.abilist
new file mode 100644
index 000000000000..71576160eddd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/ld.abilist
@@ -0,0 +1,9 @@
+GLIBC_2.29 __libc_stack_end D 0x4
+GLIBC_2.29 __stack_chk_guard D 0x4
+GLIBC_2.29 __tls_get_addr F
+GLIBC_2.29 _dl_mcount F
+GLIBC_2.29 _r_debug D 0x14
+GLIBC_2.29 calloc F
+GLIBC_2.29 free F
+GLIBC_2.29 malloc F
+GLIBC_2.29 realloc F
diff --git a/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
new file mode 100644
index 000000000000..96b4163a254a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
@@ -0,0 +1 @@
+GLIBC_2.29 __ctype_get_mb_cur_max F
diff --git a/sysdeps/unix/sysv/linux/arc/libanl.abilist b/sysdeps/unix/sysv/linux/arc/libanl.abilist
new file mode 100644
index 000000000000..416a6f8ddb26
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libanl.abilist
@@ -0,0 +1,4 @@
+GLIBC_2.29 gai_cancel F
+GLIBC_2.29 gai_error F
+GLIBC_2.29 gai_suspend F
+GLIBC_2.29 getaddrinfo_a F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
new file mode 100644
index 000000000000..1e9a5dc9f092
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -0,0 +1,2089 @@
+GLIBC_2.29 _Exit F
+GLIBC_2.29 _IO_2_1_stderr_ D 0x98
+GLIBC_2.29 _IO_2_1_stdin_ D 0x98
+GLIBC_2.29 _IO_2_1_stdout_ D 0x98
+GLIBC_2.29 _IO_adjust_column F
+GLIBC_2.29 _IO_adjust_wcolumn F
+GLIBC_2.29 _IO_default_doallocate F
+GLIBC_2.29 _IO_default_finish F
+GLIBC_2.29 _IO_default_pbackfail F
+GLIBC_2.29 _IO_default_uflow F
+GLIBC_2.29 _IO_default_xsgetn F
+GLIBC_2.29 _IO_default_xsputn F
+GLIBC_2.29 _IO_do_write F
+GLIBC_2.29 _IO_doallocbuf F
+GLIBC_2.29 _IO_fclose F
+GLIBC_2.29 _IO_fdopen F
+GLIBC_2.29 _IO_feof F
+GLIBC_2.29 _IO_ferror F
+GLIBC_2.29 _IO_fflush F
+GLIBC_2.29 _IO_fgetpos F
+GLIBC_2.29 _IO_fgetpos64 F
+GLIBC_2.29 _IO_fgets F
+GLIBC_2.29 _IO_file_attach F
+GLIBC_2.29 _IO_file_close F
+GLIBC_2.29 _IO_file_close_it F
+GLIBC_2.29 _IO_file_doallocate F
+GLIBC_2.29 _IO_file_finish F
+GLIBC_2.29 _IO_file_fopen F
+GLIBC_2.29 _IO_file_init F
+GLIBC_2.29 _IO_file_jumps D 0x54
+GLIBC_2.29 _IO_file_open F
+GLIBC_2.29 _IO_file_overflow F
+GLIBC_2.29 _IO_file_read F
+GLIBC_2.29 _IO_file_seek F
+GLIBC_2.29 _IO_file_seekoff F
+GLIBC_2.29 _IO_file_setbuf F
+GLIBC_2.29 _IO_file_stat F
+GLIBC_2.29 _IO_file_sync F
+GLIBC_2.29 _IO_file_underflow F
+GLIBC_2.29 _IO_file_write F
+GLIBC_2.29 _IO_file_xsputn F
+GLIBC_2.29 _IO_flockfile F
+GLIBC_2.29 _IO_flush_all F
+GLIBC_2.29 _IO_flush_all_linebuffered F
+GLIBC_2.29 _IO_fopen F
+GLIBC_2.29 _IO_fprintf F
+GLIBC_2.29 _IO_fputs F
+GLIBC_2.29 _IO_fread F
+GLIBC_2.29 _IO_free_backup_area F
+GLIBC_2.29 _IO_free_wbackup_area F
+GLIBC_2.29 _IO_fsetpos F
+GLIBC_2.29 _IO_fsetpos64 F
+GLIBC_2.29 _IO_ftell F
+GLIBC_2.29 _IO_ftrylockfile F
+GLIBC_2.29 _IO_funlockfile F
+GLIBC_2.29 _IO_fwrite F
+GLIBC_2.29 _IO_getc F
+GLIBC_2.29 _IO_getline F
+GLIBC_2.29 _IO_getline_info F
+GLIBC_2.29 _IO_gets F
+GLIBC_2.29 _IO_init F
+GLIBC_2.29 _IO_init_marker F
+GLIBC_2.29 _IO_init_wmarker F
+GLIBC_2.29 _IO_iter_begin F
+GLIBC_2.29 _IO_iter_end F
+GLIBC_2.29 _IO_iter_file F
+GLIBC_2.29 _IO_iter_next F
+GLIBC_2.29 _IO_least_wmarker F
+GLIBC_2.29 _IO_link_in F
+GLIBC_2.29 _IO_list_all D 0x4
+GLIBC_2.29 _IO_list_lock F
+GLIBC_2.29 _IO_list_resetlock F
+GLIBC_2.29 _IO_list_unlock F
+GLIBC_2.29 _IO_marker_delta F
+GLIBC_2.29 _IO_marker_difference F
+GLIBC_2.29 _IO_padn F
+GLIBC_2.29 _IO_peekc_locked F
+GLIBC_2.29 _IO_popen F
+GLIBC_2.29 _IO_printf F
+GLIBC_2.29 _IO_proc_close F
+GLIBC_2.29 _IO_proc_open F
+GLIBC_2.29 _IO_putc F
+GLIBC_2.29 _IO_puts F
+GLIBC_2.29 _IO_remove_marker F
+GLIBC_2.29 _IO_seekmark F
+GLIBC_2.29 _IO_seekoff F
+GLIBC_2.29 _IO_seekpos F
+GLIBC_2.29 _IO_seekwmark F
+GLIBC_2.29 _IO_setb F
+GLIBC_2.29 _IO_setbuffer F
+GLIBC_2.29 _IO_setvbuf F
+GLIBC_2.29 _IO_sgetn F
+GLIBC_2.29 _IO_sprintf F
+GLIBC_2.29 _IO_sputbackc F
+GLIBC_2.29 _IO_sputbackwc F
+GLIBC_2.29 _IO_sscanf F
+GLIBC_2.29 _IO_str_init_readonly F
+GLIBC_2.29 _IO_str_init_static F
+GLIBC_2.29 _IO_str_overflow F
+GLIBC_2.29 _IO_str_pbackfail F
+GLIBC_2.29 _IO_str_seekoff F
+GLIBC_2.29 _IO_str_underflow F
+GLIBC_2.29 _IO_sungetc F
+GLIBC_2.29 _IO_sungetwc F
+GLIBC_2.29 _IO_switch_to_get_mode F
+GLIBC_2.29 _IO_switch_to_main_wget_area F
+GLIBC_2.29 _IO_switch_to_wbackup_area F
+GLIBC_2.29 _IO_switch_to_wget_mode F
+GLIBC_2.29 _IO_un_link F
+GLIBC_2.29 _IO_ungetc F
+GLIBC_2.29 _IO_unsave_markers F
+GLIBC_2.29 _IO_unsave_wmarkers F
+GLIBC_2.29 _IO_vfprintf F
+GLIBC_2.29 _IO_vsprintf F
+GLIBC_2.29 _IO_wdefault_doallocate F
+GLIBC_2.29 _IO_wdefault_finish F
+GLIBC_2.29 _IO_wdefault_pbackfail F
+GLIBC_2.29 _IO_wdefault_uflow F
+GLIBC_2.29 _IO_wdefault_xsgetn F
+GLIBC_2.29 _IO_wdefault_xsputn F
+GLIBC_2.29 _IO_wdo_write F
+GLIBC_2.29 _IO_wdoallocbuf F
+GLIBC_2.29 _IO_wfile_jumps D 0x54
+GLIBC_2.29 _IO_wfile_overflow F
+GLIBC_2.29 _IO_wfile_seekoff F
+GLIBC_2.29 _IO_wfile_sync F
+GLIBC_2.29 _IO_wfile_underflow F
+GLIBC_2.29 _IO_wfile_xsputn F
+GLIBC_2.29 _IO_wmarker_delta F
+GLIBC_2.29 _IO_wsetb F
+GLIBC_2.29 ___brk_addr D 0x4
+GLIBC_2.29 __adjtimex F
+GLIBC_2.29 __after_morecore_hook D 0x4
+GLIBC_2.29 __argz_count F
+GLIBC_2.29 __argz_next F
+GLIBC_2.29 __argz_stringify F
+GLIBC_2.29 __asprintf F
+GLIBC_2.29 __asprintf_chk F
+GLIBC_2.29 __assert F
+GLIBC_2.29 __assert_fail F
+GLIBC_2.29 __assert_perror_fail F
+GLIBC_2.29 __backtrace F
+GLIBC_2.29 __backtrace_symbols F
+GLIBC_2.29 __backtrace_symbols_fd F
+GLIBC_2.29 __bsd_getpgrp F
+GLIBC_2.29 __bzero F
+GLIBC_2.29 __check_rhosts_file D 0x4
+GLIBC_2.29 __chk_fail F
+GLIBC_2.29 __clone F
+GLIBC_2.29 __close F
+GLIBC_2.29 __cmsg_nxthdr F
+GLIBC_2.29 __confstr_chk F
+GLIBC_2.29 __connect F
+GLIBC_2.29 __ctype_b_loc F
+GLIBC_2.29 __ctype_get_mb_cur_max F
+GLIBC_2.29 __ctype_tolower_loc F
+GLIBC_2.29 __ctype_toupper_loc F
+GLIBC_2.29 __curbrk D 0x4
+GLIBC_2.29 __cxa_at_quick_exit F
+GLIBC_2.29 __cxa_atexit F
+GLIBC_2.29 __cxa_finalize F
+GLIBC_2.29 __cxa_thread_atexit_impl F
+GLIBC_2.29 __cyg_profile_func_enter F
+GLIBC_2.29 __cyg_profile_func_exit F
+GLIBC_2.29 __daylight D 0x4
+GLIBC_2.29 __dcgettext F
+GLIBC_2.29 __default_morecore F
+GLIBC_2.29 __dgettext F
+GLIBC_2.29 __dprintf_chk F
+GLIBC_2.29 __dup2 F
+GLIBC_2.29 __duplocale F
+GLIBC_2.29 __endmntent F
+GLIBC_2.29 __environ D 0x4
+GLIBC_2.29 __errno_location F
+GLIBC_2.29 __explicit_bzero_chk F
+GLIBC_2.29 __fbufsize F
+GLIBC_2.29 __fcntl F
+GLIBC_2.29 __fdelt_chk F
+GLIBC_2.29 __fdelt_warn F
+GLIBC_2.29 __ffs F
+GLIBC_2.29 __fgets_chk F
+GLIBC_2.29 __fgets_unlocked_chk F
+GLIBC_2.29 __fgetws_chk F
+GLIBC_2.29 __fgetws_unlocked_chk F
+GLIBC_2.29 __finite F
+GLIBC_2.29 __finitef F
+GLIBC_2.29 __flbf F
+GLIBC_2.29 __fork F
+GLIBC_2.29 __fpending F
+GLIBC_2.29 __fprintf_chk F
+GLIBC_2.29 __fpu_control D 0x4
+GLIBC_2.29 __fpurge F
+GLIBC_2.29 __fread_chk F
+GLIBC_2.29 __fread_unlocked_chk F
+GLIBC_2.29 __freadable F
+GLIBC_2.29 __freading F
+GLIBC_2.29 __free_hook D 0x4
+GLIBC_2.29 __freelocale F
+GLIBC_2.29 __fsetlocking F
+GLIBC_2.29 __fwprintf_chk F
+GLIBC_2.29 __fwritable F
+GLIBC_2.29 __fwriting F
+GLIBC_2.29 __fxstat F
+GLIBC_2.29 __fxstat64 F
+GLIBC_2.29 __fxstatat F
+GLIBC_2.29 __fxstatat64 F
+GLIBC_2.29 __getauxval F
+GLIBC_2.29 __getcwd_chk F
+GLIBC_2.29 __getdelim F
+GLIBC_2.29 __getdomainname_chk F
+GLIBC_2.29 __getgroups_chk F
+GLIBC_2.29 __gethostname_chk F
+GLIBC_2.29 __getlogin_r_chk F
+GLIBC_2.29 __getmntent_r F
+GLIBC_2.29 __getpagesize F
+GLIBC_2.29 __getpgid F
+GLIBC_2.29 __getpid F
+GLIBC_2.29 __gets_chk F
+GLIBC_2.29 __gettimeofday F
+GLIBC_2.29 __getwd_chk F
+GLIBC_2.29 __gmtime_r F
+GLIBC_2.29 __h_errno_location F
+GLIBC_2.29 __isalnum_l F
+GLIBC_2.29 __isalpha_l F
+GLIBC_2.29 __isascii_l F
+GLIBC_2.29 __isblank_l F
+GLIBC_2.29 __iscntrl_l F
+GLIBC_2.29 __isctype F
+GLIBC_2.29 __isdigit_l F
+GLIBC_2.29 __isgraph_l F
+GLIBC_2.29 __isinf F
+GLIBC_2.29 __isinff F
+GLIBC_2.29 __islower_l F
+GLIBC_2.29 __isnan F
+GLIBC_2.29 __isnanf F
+GLIBC_2.29 __isoc99_fscanf F
+GLIBC_2.29 __isoc99_fwscanf F
+GLIBC_2.29 __isoc99_scanf F
+GLIBC_2.29 __isoc99_sscanf F
+GLIBC_2.29 __isoc99_swscanf F
+GLIBC_2.29 __isoc99_vfscanf F
+GLIBC_2.29 __isoc99_vfwscanf F
+GLIBC_2.29 __isoc99_vscanf F
+GLIBC_2.29 __isoc99_vsscanf F
+GLIBC_2.29 __isoc99_vswscanf F
+GLIBC_2.29 __isoc99_vwscanf F
+GLIBC_2.29 __isoc99_wscanf F
+GLIBC_2.29 __isprint_l F
+GLIBC_2.29 __ispunct_l F
+GLIBC_2.29 __isspace_l F
+GLIBC_2.29 __isupper_l F
+GLIBC_2.29 __iswalnum_l F
+GLIBC_2.29 __iswalpha_l F
+GLIBC_2.29 __iswblank_l F
+GLIBC_2.29 __iswcntrl_l F
+GLIBC_2.29 __iswctype F
+GLIBC_2.29 __iswctype_l F
+GLIBC_2.29 __iswdigit_l F
+GLIBC_2.29 __iswgraph_l F
+GLIBC_2.29 __iswlower_l F
+GLIBC_2.29 __iswprint_l F
+GLIBC_2.29 __iswpunct_l F
+GLIBC_2.29 __iswspace_l F
+GLIBC_2.29 __iswupper_l F
+GLIBC_2.29 __iswxdigit_l F
+GLIBC_2.29 __isxdigit_l F
+GLIBC_2.29 __ivaliduser F
+GLIBC_2.29 __key_decryptsession_pk_LOCAL D 0x4
+GLIBC_2.29 __key_encryptsession_pk_LOCAL D 0x4
+GLIBC_2.29 __key_gendes_LOCAL D 0x4
+GLIBC_2.29 __libc_allocate_rtsig F
+GLIBC_2.29 __libc_calloc F
+GLIBC_2.29 __libc_current_sigrtmax F
+GLIBC_2.29 __libc_current_sigrtmin F
+GLIBC_2.29 __libc_free F
+GLIBC_2.29 __libc_freeres F
+GLIBC_2.29 __libc_init_first F
+GLIBC_2.29 __libc_mallinfo F
+GLIBC_2.29 __libc_malloc F
+GLIBC_2.29 __libc_mallopt F
+GLIBC_2.29 __libc_memalign F
+GLIBC_2.29 __libc_pvalloc F
+GLIBC_2.29 __libc_realloc F
+GLIBC_2.29 __libc_sa_len F
+GLIBC_2.29 __libc_start_main F
+GLIBC_2.29 __libc_valloc F
+GLIBC_2.29 __longjmp_chk F
+GLIBC_2.29 __lseek F
+GLIBC_2.29 __lxstat F
+GLIBC_2.29 __lxstat64 F
+GLIBC_2.29 __malloc_hook D 0x4
+GLIBC_2.29 __mbrlen F
+GLIBC_2.29 __mbrtowc F
+GLIBC_2.29 __mbsnrtowcs_chk F
+GLIBC_2.29 __mbsrtowcs_chk F
+GLIBC_2.29 __mbstowcs_chk F
+GLIBC_2.29 __memalign_hook D 0x4
+GLIBC_2.29 __memcpy_chk F
+GLIBC_2.29 __memmove_chk F
+GLIBC_2.29 __mempcpy F
+GLIBC_2.29 __mempcpy_chk F
+GLIBC_2.29 __memset_chk F
+GLIBC_2.29 __monstartup F
+GLIBC_2.29 __morecore D 0x4
+GLIBC_2.29 __nanosleep F
+GLIBC_2.29 __newlocale F
+GLIBC_2.29 __nl_langinfo_l F
+GLIBC_2.29 __nss_configure_lookup F
+GLIBC_2.29 __nss_database_lookup F
+GLIBC_2.29 __nss_hostname_digits_dots F
+GLIBC_2.29 __nss_next F
+GLIBC_2.29 __obstack_printf_chk F
+GLIBC_2.29 __obstack_vprintf_chk F
+GLIBC_2.29 __open F
+GLIBC_2.29 __open64 F
+GLIBC_2.29 __open64_2 F
+GLIBC_2.29 __open_2 F
+GLIBC_2.29 __openat64_2 F
+GLIBC_2.29 __openat_2 F
+GLIBC_2.29 __overflow F
+GLIBC_2.29 __pipe F
+GLIBC_2.29 __poll F
+GLIBC_2.29 __poll_chk F
+GLIBC_2.29 __posix_getopt F
+GLIBC_2.29 __ppoll_chk F
+GLIBC_2.29 __pread64 F
+GLIBC_2.29 __pread64_chk F
+GLIBC_2.29 __pread_chk F
+GLIBC_2.29 __printf_chk F
+GLIBC_2.29 __printf_fp F
+GLIBC_2.29 __profile_frequency F
+GLIBC_2.29 __progname D 0x4
+GLIBC_2.29 __progname_full D 0x4
+GLIBC_2.29 __ptsname_r_chk F
+GLIBC_2.29 __pwrite64 F
+GLIBC_2.29 __rawmemchr F
+GLIBC_2.29 __rcmd_errstr D 0x4
+GLIBC_2.29 __read F
+GLIBC_2.29 __read_chk F
+GLIBC_2.29 __readlink_chk F
+GLIBC_2.29 __readlinkat_chk F
+GLIBC_2.29 __realloc_hook D 0x4
+GLIBC_2.29 __realpath_chk F
+GLIBC_2.29 __recv_chk F
+GLIBC_2.29 __recvfrom_chk F
+GLIBC_2.29 __register_atfork F
+GLIBC_2.29 __res_init F
+GLIBC_2.29 __res_nclose F
+GLIBC_2.29 __res_ninit F
+GLIBC_2.29 __res_randomid F
+GLIBC_2.29 __res_state F
+GLIBC_2.29 __rpc_thread_createerr F
+GLIBC_2.29 __rpc_thread_svc_fdset F
+GLIBC_2.29 __rpc_thread_svc_max_pollfd F
+GLIBC_2.29 __rpc_thread_svc_pollfd F
+GLIBC_2.29 __sbrk F
+GLIBC_2.29 __sched_cpualloc F
+GLIBC_2.29 __sched_cpucount F
+GLIBC_2.29 __sched_cpufree F
+GLIBC_2.29 __sched_get_priority_max F
+GLIBC_2.29 __sched_get_priority_min F
+GLIBC_2.29 __sched_getparam F
+GLIBC_2.29 __sched_getscheduler F
+GLIBC_2.29 __sched_setscheduler F
+GLIBC_2.29 __sched_yield F
+GLIBC_2.29 __select F
+GLIBC_2.29 __send F
+GLIBC_2.29 __setmntent F
+GLIBC_2.29 __setpgid F
+GLIBC_2.29 __sigaction F
+GLIBC_2.29 __signbit F
+GLIBC_2.29 __signbitf F
+GLIBC_2.29 __sigpause F
+GLIBC_2.29 __sigsetjmp F
+GLIBC_2.29 __sigsuspend F
+GLIBC_2.29 __snprintf_chk F
+GLIBC_2.29 __sprintf_chk F
+GLIBC_2.29 __stack_chk_fail F
+GLIBC_2.29 __statfs F
+GLIBC_2.29 __stpcpy F
+GLIBC_2.29 __stpcpy_chk F
+GLIBC_2.29 __stpncpy F
+GLIBC_2.29 __stpncpy_chk F
+GLIBC_2.29 __strcasecmp F
+GLIBC_2.29 __strcasecmp_l F
+GLIBC_2.29 __strcasestr F
+GLIBC_2.29 __strcat_chk F
+GLIBC_2.29 __strcoll_l F
+GLIBC_2.29 __strcpy_chk F
+GLIBC_2.29 __strdup F
+GLIBC_2.29 __strerror_r F
+GLIBC_2.29 __strfmon_l F
+GLIBC_2.29 __strftime_l F
+GLIBC_2.29 __strncasecmp_l F
+GLIBC_2.29 __strncat_chk F
+GLIBC_2.29 __strncpy_chk F
+GLIBC_2.29 __strndup F
+GLIBC_2.29 __strsep_g F
+GLIBC_2.29 __strtod_internal F
+GLIBC_2.29 __strtod_l F
+GLIBC_2.29 __strtof_internal F
+GLIBC_2.29 __strtof_l F
+GLIBC_2.29 __strtok_r F
+GLIBC_2.29 __strtol_internal F
+GLIBC_2.29 __strtol_l F
+GLIBC_2.29 __strtold_internal F
+GLIBC_2.29 __strtold_l F
+GLIBC_2.29 __strtoll_internal F
+GLIBC_2.29 __strtoll_l F
+GLIBC_2.29 __strtoul_internal F
+GLIBC_2.29 __strtoul_l F
+GLIBC_2.29 __strtoull_internal F
+GLIBC_2.29 __strtoull_l F
+GLIBC_2.29 __strverscmp F
+GLIBC_2.29 __strxfrm_l F
+GLIBC_2.29 __swprintf_chk F
+GLIBC_2.29 __syscall_error F
+GLIBC_2.29 __sysconf F
+GLIBC_2.29 __syslog_chk F
+GLIBC_2.29 __sysv_signal F
+GLIBC_2.29 __timezone D 0x4
+GLIBC_2.29 __toascii_l F
+GLIBC_2.29 __tolower_l F
+GLIBC_2.29 __toupper_l F
+GLIBC_2.29 __towctrans F
+GLIBC_2.29 __towctrans_l F
+GLIBC_2.29 __towlower_l F
+GLIBC_2.29 __towupper_l F
+GLIBC_2.29 __ttyname_r_chk F
+GLIBC_2.29 __tzname D 0x8
+GLIBC_2.29 __uflow F
+GLIBC_2.29 __underflow F
+GLIBC_2.29 __uselocale F
+GLIBC_2.29 __vasprintf_chk F
+GLIBC_2.29 __vdprintf_chk F
+GLIBC_2.29 __vfork F
+GLIBC_2.29 __vfprintf_chk F
+GLIBC_2.29 __vfscanf F
+GLIBC_2.29 __vfwprintf_chk F
+GLIBC_2.29 __vprintf_chk F
+GLIBC_2.29 __vsnprintf F
+GLIBC_2.29 __vsnprintf_chk F
+GLIBC_2.29 __vsprintf_chk F
+GLIBC_2.29 __vsscanf F
+GLIBC_2.29 __vswprintf_chk F
+GLIBC_2.29 __vsyslog_chk F
+GLIBC_2.29 __vwprintf_chk F
+GLIBC_2.29 __wait F
+GLIBC_2.29 __waitpid F
+GLIBC_2.29 __wcpcpy_chk F
+GLIBC_2.29 __wcpncpy_chk F
+GLIBC_2.29 __wcrtomb_chk F
+GLIBC_2.29 __wcscasecmp_l F
+GLIBC_2.29 __wcscat_chk F
+GLIBC_2.29 __wcscoll_l F
+GLIBC_2.29 __wcscpy_chk F
+GLIBC_2.29 __wcsftime_l F
+GLIBC_2.29 __wcsncasecmp_l F
+GLIBC_2.29 __wcsncat_chk F
+GLIBC_2.29 __wcsncpy_chk F
+GLIBC_2.29 __wcsnrtombs_chk F
+GLIBC_2.29 __wcsrtombs_chk F
+GLIBC_2.29 __wcstod_internal F
+GLIBC_2.29 __wcstod_l F
+GLIBC_2.29 __wcstof_internal F
+GLIBC_2.29 __wcstof_l F
+GLIBC_2.29 __wcstol_internal F
+GLIBC_2.29 __wcstol_l F
+GLIBC_2.29 __wcstold_internal F
+GLIBC_2.29 __wcstold_l F
+GLIBC_2.29 __wcstoll_internal F
+GLIBC_2.29 __wcstoll_l F
+GLIBC_2.29 __wcstombs_chk F
+GLIBC_2.29 __wcstoul_internal F
+GLIBC_2.29 __wcstoul_l F
+GLIBC_2.29 __wcstoull_internal F
+GLIBC_2.29 __wcstoull_l F
+GLIBC_2.29 __wcsxfrm_l F
+GLIBC_2.29 __wctomb_chk F
+GLIBC_2.29 __wctrans_l F
+GLIBC_2.29 __wctype_l F
+GLIBC_2.29 __wmemcpy_chk F
+GLIBC_2.29 __wmemmove_chk F
+GLIBC_2.29 __wmempcpy_chk F
+GLIBC_2.29 __wmemset_chk F
+GLIBC_2.29 __woverflow F
+GLIBC_2.29 __wprintf_chk F
+GLIBC_2.29 __write F
+GLIBC_2.29 __wuflow F
+GLIBC_2.29 __wunderflow F
+GLIBC_2.29 __xmknod F
+GLIBC_2.29 __xmknodat F
+GLIBC_2.29 __xpg_basename F
+GLIBC_2.29 __xpg_sigpause F
+GLIBC_2.29 __xpg_strerror_r F
+GLIBC_2.29 __xstat F
+GLIBC_2.29 __xstat64 F
+GLIBC_2.29 _authenticate F
+GLIBC_2.29 _dl_mcount_wrapper F
+GLIBC_2.29 _dl_mcount_wrapper_check F
+GLIBC_2.29 _environ D 0x4
+GLIBC_2.29 _exit F
+GLIBC_2.29 _flush_cache F
+GLIBC_2.29 _flushlbf F
+GLIBC_2.29 _libc_intl_domainname D 0x5
+GLIBC_2.29 _longjmp F
+GLIBC_2.29 _mcleanup F
+GLIBC_2.29 _mcount F
+GLIBC_2.29 _nl_default_dirname D 0x12
+GLIBC_2.29 _nl_domain_bindings D 0x4
+GLIBC_2.29 _nl_msg_cat_cntr D 0x4
+GLIBC_2.29 _null_auth D 0xc
+GLIBC_2.29 _obstack_allocated_p F
+GLIBC_2.29 _obstack_begin F
+GLIBC_2.29 _obstack_begin_1 F
+GLIBC_2.29 _obstack_free F
+GLIBC_2.29 _obstack_memory_used F
+GLIBC_2.29 _obstack_newchunk F
+GLIBC_2.29 _res D 0x200
+GLIBC_2.29 _res_hconf D 0x30
+GLIBC_2.29 _rpc_dtablesize F
+GLIBC_2.29 _seterr_reply F
+GLIBC_2.29 _setjmp F
+GLIBC_2.29 _sys_errlist D 0x21c
+GLIBC_2.29 _sys_nerr D 0x4
+GLIBC_2.29 _sys_siglist D 0x104
+GLIBC_2.29 _tolower F
+GLIBC_2.29 _toupper F
+GLIBC_2.29 a64l F
+GLIBC_2.29 abort F
+GLIBC_2.29 abs F
+GLIBC_2.29 accept F
+GLIBC_2.29 accept4 F
+GLIBC_2.29 access F
+GLIBC_2.29 acct F
+GLIBC_2.29 addmntent F
+GLIBC_2.29 addseverity F
+GLIBC_2.29 adjtime F
+GLIBC_2.29 adjtimex F
+GLIBC_2.29 alarm F
+GLIBC_2.29 aligned_alloc F
+GLIBC_2.29 alphasort F
+GLIBC_2.29 alphasort64 F
+GLIBC_2.29 argp_err_exit_status D 0x4
+GLIBC_2.29 argp_error F
+GLIBC_2.29 argp_failure F
+GLIBC_2.29 argp_help F
+GLIBC_2.29 argp_parse F
+GLIBC_2.29 argp_program_bug_address D 0x4
+GLIBC_2.29 argp_program_version D 0x4
+GLIBC_2.29 argp_program_version_hook D 0x4
+GLIBC_2.29 argp_state_help F
+GLIBC_2.29 argp_usage F
+GLIBC_2.29 argz_add F
+GLIBC_2.29 argz_add_sep F
+GLIBC_2.29 argz_append F
+GLIBC_2.29 argz_count F
+GLIBC_2.29 argz_create F
+GLIBC_2.29 argz_create_sep F
+GLIBC_2.29 argz_delete F
+GLIBC_2.29 argz_extract F
+GLIBC_2.29 argz_insert F
+GLIBC_2.29 argz_next F
+GLIBC_2.29 argz_replace F
+GLIBC_2.29 argz_stringify F
+GLIBC_2.29 asctime F
+GLIBC_2.29 asctime_r F
+GLIBC_2.29 asprintf F
+GLIBC_2.29 atof F
+GLIBC_2.29 atoi F
+GLIBC_2.29 atol F
+GLIBC_2.29 atoll F
+GLIBC_2.29 authdes_create F
+GLIBC_2.29 authdes_getucred F
+GLIBC_2.29 authdes_pk_create F
+GLIBC_2.29 authnone_create F
+GLIBC_2.29 authunix_create F
+GLIBC_2.29 authunix_create_default F
+GLIBC_2.29 backtrace F
+GLIBC_2.29 backtrace_symbols F
+GLIBC_2.29 backtrace_symbols_fd F
+GLIBC_2.29 basename F
+GLIBC_2.29 bcmp F
+GLIBC_2.29 bcopy F
+GLIBC_2.29 bind F
+GLIBC_2.29 bind_textdomain_codeset F
+GLIBC_2.29 bindresvport F
+GLIBC_2.29 bindtextdomain F
+GLIBC_2.29 brk F
+GLIBC_2.29 bsd_signal F
+GLIBC_2.29 bsearch F
+GLIBC_2.29 btowc F
+GLIBC_2.29 bzero F
+GLIBC_2.29 c16rtomb F
+GLIBC_2.29 c32rtomb F
+GLIBC_2.29 cacheflush F
+GLIBC_2.29 calloc F
+GLIBC_2.29 callrpc F
+GLIBC_2.29 canonicalize_file_name F
+GLIBC_2.29 capget F
+GLIBC_2.29 capset F
+GLIBC_2.29 catclose F
+GLIBC_2.29 catgets F
+GLIBC_2.29 catopen F
+GLIBC_2.29 cbc_crypt F
+GLIBC_2.29 cfgetispeed F
+GLIBC_2.29 cfgetospeed F
+GLIBC_2.29 cfmakeraw F
+GLIBC_2.29 cfsetispeed F
+GLIBC_2.29 cfsetospeed F
+GLIBC_2.29 cfsetspeed F
+GLIBC_2.29 chdir F
+GLIBC_2.29 chflags F
+GLIBC_2.29 chmod F
+GLIBC_2.29 chown F
+GLIBC_2.29 chroot F
+GLIBC_2.29 clearenv F
+GLIBC_2.29 clearerr F
+GLIBC_2.29 clearerr_unlocked F
+GLIBC_2.29 clnt_broadcast F
+GLIBC_2.29 clnt_create F
+GLIBC_2.29 clnt_pcreateerror F
+GLIBC_2.29 clnt_perrno F
+GLIBC_2.29 clnt_perror F
+GLIBC_2.29 clnt_spcreateerror F
+GLIBC_2.29 clnt_sperrno F
+GLIBC_2.29 clnt_sperror F
+GLIBC_2.29 clntraw_create F
+GLIBC_2.29 clnttcp_create F
+GLIBC_2.29 clntudp_bufcreate F
+GLIBC_2.29 clntudp_create F
+GLIBC_2.29 clntunix_create F
+GLIBC_2.29 clock F
+GLIBC_2.29 clock_adjtime F
+GLIBC_2.29 clock_getcpuclockid F
+GLIBC_2.29 clock_getres F
+GLIBC_2.29 clock_gettime F
+GLIBC_2.29 clock_nanosleep F
+GLIBC_2.29 clock_settime F
+GLIBC_2.29 clone F
+GLIBC_2.29 close F
+GLIBC_2.29 closedir F
+GLIBC_2.29 closelog F
+GLIBC_2.29 confstr F
+GLIBC_2.29 connect F
+GLIBC_2.29 copy_file_range F
+GLIBC_2.29 copysign F
+GLIBC_2.29 copysignf F
+GLIBC_2.29 copysignl F
+GLIBC_2.29 creat F
+GLIBC_2.29 creat64 F
+GLIBC_2.29 ctermid F
+GLIBC_2.29 ctime F
+GLIBC_2.29 ctime_r F
+GLIBC_2.29 cuserid F
+GLIBC_2.29 daemon F
+GLIBC_2.29 daylight D 0x4
+GLIBC_2.29 dcgettext F
+GLIBC_2.29 dcngettext F
+GLIBC_2.29 delete_module F
+GLIBC_2.29 des_setparity F
+GLIBC_2.29 dgettext F
+GLIBC_2.29 difftime F
+GLIBC_2.29 dirfd F
+GLIBC_2.29 dirname F
+GLIBC_2.29 div F
+GLIBC_2.29 dl_iterate_phdr F
+GLIBC_2.29 dngettext F
+GLIBC_2.29 dprintf F
+GLIBC_2.29 drand48 F
+GLIBC_2.29 drand48_r F
+GLIBC_2.29 dup F
+GLIBC_2.29 dup2 F
+GLIBC_2.29 dup3 F
+GLIBC_2.29 duplocale F
+GLIBC_2.29 dysize F
+GLIBC_2.29 eaccess F
+GLIBC_2.29 ecb_crypt F
+GLIBC_2.29 ecvt F
+GLIBC_2.29 ecvt_r F
+GLIBC_2.29 endaliasent F
+GLIBC_2.29 endfsent F
+GLIBC_2.29 endgrent F
+GLIBC_2.29 endhostent F
+GLIBC_2.29 endmntent F
+GLIBC_2.29 endnetent F
+GLIBC_2.29 endnetgrent F
+GLIBC_2.29 endprotoent F
+GLIBC_2.29 endpwent F
+GLIBC_2.29 endrpcent F
+GLIBC_2.29 endservent F
+GLIBC_2.29 endsgent F
+GLIBC_2.29 endspent F
+GLIBC_2.29 endttyent F
+GLIBC_2.29 endusershell F
+GLIBC_2.29 endutent F
+GLIBC_2.29 endutxent F
+GLIBC_2.29 environ D 0x4
+GLIBC_2.29 envz_add F
+GLIBC_2.29 envz_entry F
+GLIBC_2.29 envz_get F
+GLIBC_2.29 envz_merge F
+GLIBC_2.29 envz_remove F
+GLIBC_2.29 envz_strip F
+GLIBC_2.29 epoll_create F
+GLIBC_2.29 epoll_create1 F
+GLIBC_2.29 epoll_ctl F
+GLIBC_2.29 epoll_pwait F
+GLIBC_2.29 epoll_wait F
+GLIBC_2.29 erand48 F
+GLIBC_2.29 erand48_r F
+GLIBC_2.29 err F
+GLIBC_2.29 error F
+GLIBC_2.29 error_at_line F
+GLIBC_2.29 error_message_count D 0x4
+GLIBC_2.29 error_one_per_line D 0x4
+GLIBC_2.29 error_print_progname D 0x4
+GLIBC_2.29 errx F
+GLIBC_2.29 ether_aton F
+GLIBC_2.29 ether_aton_r F
+GLIBC_2.29 ether_hostton F
+GLIBC_2.29 ether_line F
+GLIBC_2.29 ether_ntoa F
+GLIBC_2.29 ether_ntoa_r F
+GLIBC_2.29 ether_ntohost F
+GLIBC_2.29 euidaccess F
+GLIBC_2.29 eventfd F
+GLIBC_2.29 eventfd_read F
+GLIBC_2.29 eventfd_write F
+GLIBC_2.29 execl F
+GLIBC_2.29 execle F
+GLIBC_2.29 execlp F
+GLIBC_2.29 execv F
+GLIBC_2.29 execve F
+GLIBC_2.29 execvp F
+GLIBC_2.29 execvpe F
+GLIBC_2.29 exit F
+GLIBC_2.29 explicit_bzero F
+GLIBC_2.29 faccessat F
+GLIBC_2.29 fallocate F
+GLIBC_2.29 fallocate64 F
+GLIBC_2.29 fanotify_init F
+GLIBC_2.29 fanotify_mark F
+GLIBC_2.29 fattach F
+GLIBC_2.29 fchdir F
+GLIBC_2.29 fchflags F
+GLIBC_2.29 fchmod F
+GLIBC_2.29 fchmodat F
+GLIBC_2.29 fchown F
+GLIBC_2.29 fchownat F
+GLIBC_2.29 fclose F
+GLIBC_2.29 fcloseall F
+GLIBC_2.29 fcntl F
+GLIBC_2.29 fcntl64 F
+GLIBC_2.29 fcvt F
+GLIBC_2.29 fcvt_r F
+GLIBC_2.29 fdatasync F
+GLIBC_2.29 fdetach F
+GLIBC_2.29 fdopen F
+GLIBC_2.29 fdopendir F
+GLIBC_2.29 feof F
+GLIBC_2.29 feof_unlocked F
+GLIBC_2.29 ferror F
+GLIBC_2.29 ferror_unlocked F
+GLIBC_2.29 fexecve F
+GLIBC_2.29 fflush F
+GLIBC_2.29 fflush_unlocked F
+GLIBC_2.29 ffs F
+GLIBC_2.29 ffsl F
+GLIBC_2.29 ffsll F
+GLIBC_2.29 fgetc F
+GLIBC_2.29 fgetc_unlocked F
+GLIBC_2.29 fgetgrent F
+GLIBC_2.29 fgetgrent_r F
+GLIBC_2.29 fgetpos F
+GLIBC_2.29 fgetpos64 F
+GLIBC_2.29 fgetpwent F
+GLIBC_2.29 fgetpwent_r F
+GLIBC_2.29 fgets F
+GLIBC_2.29 fgets_unlocked F
+GLIBC_2.29 fgetsgent F
+GLIBC_2.29 fgetsgent_r F
+GLIBC_2.29 fgetspent F
+GLIBC_2.29 fgetspent_r F
+GLIBC_2.29 fgetwc F
+GLIBC_2.29 fgetwc_unlocked F
+GLIBC_2.29 fgetws F
+GLIBC_2.29 fgetws_unlocked F
+GLIBC_2.29 fgetxattr F
+GLIBC_2.29 fileno F
+GLIBC_2.29 fileno_unlocked F
+GLIBC_2.29 finite F
+GLIBC_2.29 finitef F
+GLIBC_2.29 finitel F
+GLIBC_2.29 flistxattr F
+GLIBC_2.29 flock F
+GLIBC_2.29 flockfile F
+GLIBC_2.29 fmemopen F
+GLIBC_2.29 fmtmsg F
+GLIBC_2.29 fnmatch F
+GLIBC_2.29 fopen F
+GLIBC_2.29 fopen64 F
+GLIBC_2.29 fopencookie F
+GLIBC_2.29 fork F
+GLIBC_2.29 fpathconf F
+GLIBC_2.29 fprintf F
+GLIBC_2.29 fputc F
+GLIBC_2.29 fputc_unlocked F
+GLIBC_2.29 fputs F
+GLIBC_2.29 fputs_unlocked F
+GLIBC_2.29 fputwc F
+GLIBC_2.29 fputwc_unlocked F
+GLIBC_2.29 fputws F
+GLIBC_2.29 fputws_unlocked F
+GLIBC_2.29 fread F
+GLIBC_2.29 fread_unlocked F
+GLIBC_2.29 free F
+GLIBC_2.29 freeaddrinfo F
+GLIBC_2.29 freeifaddrs F
+GLIBC_2.29 freelocale F
+GLIBC_2.29 fremovexattr F
+GLIBC_2.29 freopen F
+GLIBC_2.29 freopen64 F
+GLIBC_2.29 frexp F
+GLIBC_2.29 frexpf F
+GLIBC_2.29 frexpl F
+GLIBC_2.29 fscanf F
+GLIBC_2.29 fseek F
+GLIBC_2.29 fseeko F
+GLIBC_2.29 fseeko64 F
+GLIBC_2.29 fsetpos F
+GLIBC_2.29 fsetpos64 F
+GLIBC_2.29 fsetxattr F
+GLIBC_2.29 fstatfs F
+GLIBC_2.29 fstatfs64 F
+GLIBC_2.29 fstatvfs F
+GLIBC_2.29 fstatvfs64 F
+GLIBC_2.29 fsync F
+GLIBC_2.29 ftell F
+GLIBC_2.29 ftello F
+GLIBC_2.29 ftello64 F
+GLIBC_2.29 ftime F
+GLIBC_2.29 ftok F
+GLIBC_2.29 ftruncate F
+GLIBC_2.29 ftruncate64 F
+GLIBC_2.29 ftrylockfile F
+GLIBC_2.29 fts64_children F
+GLIBC_2.29 fts64_close F
+GLIBC_2.29 fts64_open F
+GLIBC_2.29 fts64_read F
+GLIBC_2.29 fts64_set F
+GLIBC_2.29 fts_children F
+GLIBC_2.29 fts_close F
+GLIBC_2.29 fts_open F
+GLIBC_2.29 fts_read F
+GLIBC_2.29 fts_set F
+GLIBC_2.29 ftw F
+GLIBC_2.29 ftw64 F
+GLIBC_2.29 funlockfile F
+GLIBC_2.29 futimens F
+GLIBC_2.29 futimes F
+GLIBC_2.29 futimesat F
+GLIBC_2.29 fwide F
+GLIBC_2.29 fwprintf F
+GLIBC_2.29 fwrite F
+GLIBC_2.29 fwrite_unlocked F
+GLIBC_2.29 fwscanf F
+GLIBC_2.29 gai_strerror F
+GLIBC_2.29 gcvt F
+GLIBC_2.29 get_avphys_pages F
+GLIBC_2.29 get_current_dir_name F
+GLIBC_2.29 get_myaddress F
+GLIBC_2.29 get_nprocs F
+GLIBC_2.29 get_nprocs_conf F
+GLIBC_2.29 get_phys_pages F
+GLIBC_2.29 getaddrinfo F
+GLIBC_2.29 getaliasbyname F
+GLIBC_2.29 getaliasbyname_r F
+GLIBC_2.29 getaliasent F
+GLIBC_2.29 getaliasent_r F
+GLIBC_2.29 getauxval F
+GLIBC_2.29 getc F
+GLIBC_2.29 getc_unlocked F
+GLIBC_2.29 getchar F
+GLIBC_2.29 getchar_unlocked F
+GLIBC_2.29 getcontext F
+GLIBC_2.29 getcpu F
+GLIBC_2.29 getcwd F
+GLIBC_2.29 getdate F
+GLIBC_2.29 getdate_err D 0x4
+GLIBC_2.29 getdate_r F
+GLIBC_2.29 getdelim F
+GLIBC_2.29 getdirentries F
+GLIBC_2.29 getdirentries64 F
+GLIBC_2.29 getdomainname F
+GLIBC_2.29 getdtablesize F
+GLIBC_2.29 getegid F
+GLIBC_2.29 getentropy F
+GLIBC_2.29 getenv F
+GLIBC_2.29 geteuid F
+GLIBC_2.29 getfsent F
+GLIBC_2.29 getfsfile F
+GLIBC_2.29 getfsspec F
+GLIBC_2.29 getgid F
+GLIBC_2.29 getgrent F
+GLIBC_2.29 getgrent_r F
+GLIBC_2.29 getgrgid F
+GLIBC_2.29 getgrgid_r F
+GLIBC_2.29 getgrnam F
+GLIBC_2.29 getgrnam_r F
+GLIBC_2.29 getgrouplist F
+GLIBC_2.29 getgroups F
+GLIBC_2.29 gethostbyaddr F
+GLIBC_2.29 gethostbyaddr_r F
+GLIBC_2.29 gethostbyname F
+GLIBC_2.29 gethostbyname2 F
+GLIBC_2.29 gethostbyname2_r F
+GLIBC_2.29 gethostbyname_r F
+GLIBC_2.29 gethostent F
+GLIBC_2.29 gethostent_r F
+GLIBC_2.29 gethostid F
+GLIBC_2.29 gethostname F
+GLIBC_2.29 getifaddrs F
+GLIBC_2.29 getipv4sourcefilter F
+GLIBC_2.29 getitimer F
+GLIBC_2.29 getline F
+GLIBC_2.29 getloadavg F
+GLIBC_2.29 getlogin F
+GLIBC_2.29 getlogin_r F
+GLIBC_2.29 getmntent F
+GLIBC_2.29 getmntent_r F
+GLIBC_2.29 getmsg F
+GLIBC_2.29 getnameinfo F
+GLIBC_2.29 getnetbyaddr F
+GLIBC_2.29 getnetbyaddr_r F
+GLIBC_2.29 getnetbyname F
+GLIBC_2.29 getnetbyname_r F
+GLIBC_2.29 getnetent F
+GLIBC_2.29 getnetent_r F
+GLIBC_2.29 getnetgrent F
+GLIBC_2.29 getnetgrent_r F
+GLIBC_2.29 getnetname F
+GLIBC_2.29 getopt F
+GLIBC_2.29 getopt_long F
+GLIBC_2.29 getopt_long_only F
+GLIBC_2.29 getpagesize F
+GLIBC_2.29 getpass F
+GLIBC_2.29 getpeername F
+GLIBC_2.29 getpgid F
+GLIBC_2.29 getpgrp F
+GLIBC_2.29 getpid F
+GLIBC_2.29 getpmsg F
+GLIBC_2.29 getppid F
+GLIBC_2.29 getpriority F
+GLIBC_2.29 getprotobyname F
+GLIBC_2.29 getprotobyname_r F
+GLIBC_2.29 getprotobynumber F
+GLIBC_2.29 getprotobynumber_r F
+GLIBC_2.29 getprotoent F
+GLIBC_2.29 getprotoent_r F
+GLIBC_2.29 getpt F
+GLIBC_2.29 getpublickey F
+GLIBC_2.29 getpw F
+GLIBC_2.29 getpwent F
+GLIBC_2.29 getpwent_r F
+GLIBC_2.29 getpwnam F
+GLIBC_2.29 getpwnam_r F
+GLIBC_2.29 getpwuid F
+GLIBC_2.29 getpwuid_r F
+GLIBC_2.29 getrandom F
+GLIBC_2.29 getresgid F
+GLIBC_2.29 getresuid F
+GLIBC_2.29 getrlimit F
+GLIBC_2.29 getrlimit64 F
+GLIBC_2.29 getrpcbyname F
+GLIBC_2.29 getrpcbyname_r F
+GLIBC_2.29 getrpcbynumber F
+GLIBC_2.29 getrpcbynumber_r F
+GLIBC_2.29 getrpcent F
+GLIBC_2.29 getrpcent_r F
+GLIBC_2.29 getrpcport F
+GLIBC_2.29 getrusage F
+GLIBC_2.29 gets F
+GLIBC_2.29 getsecretkey F
+GLIBC_2.29 getservbyname F
+GLIBC_2.29 getservbyname_r F
+GLIBC_2.29 getservbyport F
+GLIBC_2.29 getservbyport_r F
+GLIBC_2.29 getservent F
+GLIBC_2.29 getservent_r F
+GLIBC_2.29 getsgent F
+GLIBC_2.29 getsgent_r F
+GLIBC_2.29 getsgnam F
+GLIBC_2.29 getsgnam_r F
+GLIBC_2.29 getsid F
+GLIBC_2.29 getsockname F
+GLIBC_2.29 getsockopt F
+GLIBC_2.29 getsourcefilter F
+GLIBC_2.29 getspent F
+GLIBC_2.29 getspent_r F
+GLIBC_2.29 getspnam F
+GLIBC_2.29 getspnam_r F
+GLIBC_2.29 getsubopt F
+GLIBC_2.29 gettext F
+GLIBC_2.29 gettimeofday F
+GLIBC_2.29 getttyent F
+GLIBC_2.29 getttynam F
+GLIBC_2.29 getuid F
+GLIBC_2.29 getusershell F
+GLIBC_2.29 getutent F
+GLIBC_2.29 getutent_r F
+GLIBC_2.29 getutid F
+GLIBC_2.29 getutid_r F
+GLIBC_2.29 getutline F
+GLIBC_2.29 getutline_r F
+GLIBC_2.29 getutmp F
+GLIBC_2.29 getutmpx F
+GLIBC_2.29 getutxent F
+GLIBC_2.29 getutxid F
+GLIBC_2.29 getutxline F
+GLIBC_2.29 getw F
+GLIBC_2.29 getwc F
+GLIBC_2.29 getwc_unlocked F
+GLIBC_2.29 getwchar F
+GLIBC_2.29 getwchar_unlocked F
+GLIBC_2.29 getwd F
+GLIBC_2.29 getxattr F
+GLIBC_2.29 glob F
+GLIBC_2.29 glob64 F
+GLIBC_2.29 glob_pattern_p F
+GLIBC_2.29 globfree F
+GLIBC_2.29 globfree64 F
+GLIBC_2.29 gmtime F
+GLIBC_2.29 gmtime_r F
+GLIBC_2.29 gnu_dev_major F
+GLIBC_2.29 gnu_dev_makedev F
+GLIBC_2.29 gnu_dev_minor F
+GLIBC_2.29 gnu_get_libc_release F
+GLIBC_2.29 gnu_get_libc_version F
+GLIBC_2.29 grantpt F
+GLIBC_2.29 group_member F
+GLIBC_2.29 gsignal F
+GLIBC_2.29 gtty F
+GLIBC_2.29 h_errlist D 0x14
+GLIBC_2.29 h_nerr D 0x4
+GLIBC_2.29 hasmntopt F
+GLIBC_2.29 hcreate F
+GLIBC_2.29 hcreate_r F
+GLIBC_2.29 hdestroy F
+GLIBC_2.29 hdestroy_r F
+GLIBC_2.29 herror F
+GLIBC_2.29 host2netname F
+GLIBC_2.29 hsearch F
+GLIBC_2.29 hsearch_r F
+GLIBC_2.29 hstrerror F
+GLIBC_2.29 htonl F
+GLIBC_2.29 htons F
+GLIBC_2.29 iconv F
+GLIBC_2.29 iconv_close F
+GLIBC_2.29 iconv_open F
+GLIBC_2.29 if_freenameindex F
+GLIBC_2.29 if_indextoname F
+GLIBC_2.29 if_nameindex F
+GLIBC_2.29 if_nametoindex F
+GLIBC_2.29 imaxabs F
+GLIBC_2.29 imaxdiv F
+GLIBC_2.29 in6addr_any D 0x10
+GLIBC_2.29 in6addr_loopback D 0x10
+GLIBC_2.29 index F
+GLIBC_2.29 inet6_opt_append F
+GLIBC_2.29 inet6_opt_find F
+GLIBC_2.29 inet6_opt_finish F
+GLIBC_2.29 inet6_opt_get_val F
+GLIBC_2.29 inet6_opt_init F
+GLIBC_2.29 inet6_opt_next F
+GLIBC_2.29 inet6_opt_set_val F
+GLIBC_2.29 inet6_option_alloc F
+GLIBC_2.29 inet6_option_append F
+GLIBC_2.29 inet6_option_find F
+GLIBC_2.29 inet6_option_init F
+GLIBC_2.29 inet6_option_next F
+GLIBC_2.29 inet6_option_space F
+GLIBC_2.29 inet6_rth_add F
+GLIBC_2.29 inet6_rth_getaddr F
+GLIBC_2.29 inet6_rth_init F
+GLIBC_2.29 inet6_rth_reverse F
+GLIBC_2.29 inet6_rth_segments F
+GLIBC_2.29 inet6_rth_space F
+GLIBC_2.29 inet_addr F
+GLIBC_2.29 inet_aton F
+GLIBC_2.29 inet_lnaof F
+GLIBC_2.29 inet_makeaddr F
+GLIBC_2.29 inet_netof F
+GLIBC_2.29 inet_network F
+GLIBC_2.29 inet_nsap_addr F
+GLIBC_2.29 inet_nsap_ntoa F
+GLIBC_2.29 inet_ntoa F
+GLIBC_2.29 inet_ntop F
+GLIBC_2.29 inet_pton F
+GLIBC_2.29 init_module F
+GLIBC_2.29 initgroups F
+GLIBC_2.29 initstate F
+GLIBC_2.29 initstate_r F
+GLIBC_2.29 innetgr F
+GLIBC_2.29 inotify_add_watch F
+GLIBC_2.29 inotify_init F
+GLIBC_2.29 inotify_init1 F
+GLIBC_2.29 inotify_rm_watch F
+GLIBC_2.29 insque F
+GLIBC_2.29 ioctl F
+GLIBC_2.29 iruserok F
+GLIBC_2.29 iruserok_af F
+GLIBC_2.29 isalnum F
+GLIBC_2.29 isalnum_l F
+GLIBC_2.29 isalpha F
+GLIBC_2.29 isalpha_l F
+GLIBC_2.29 isascii F
+GLIBC_2.29 isastream F
+GLIBC_2.29 isatty F
+GLIBC_2.29 isblank F
+GLIBC_2.29 isblank_l F
+GLIBC_2.29 iscntrl F
+GLIBC_2.29 iscntrl_l F
+GLIBC_2.29 isctype F
+GLIBC_2.29 isdigit F
+GLIBC_2.29 isdigit_l F
+GLIBC_2.29 isfdtype F
+GLIBC_2.29 isgraph F
+GLIBC_2.29 isgraph_l F
+GLIBC_2.29 isinf F
+GLIBC_2.29 isinff F
+GLIBC_2.29 isinfl F
+GLIBC_2.29 islower F
+GLIBC_2.29 islower_l F
+GLIBC_2.29 isnan F
+GLIBC_2.29 isnanf F
+GLIBC_2.29 isnanl F
+GLIBC_2.29 isprint F
+GLIBC_2.29 isprint_l F
+GLIBC_2.29 ispunct F
+GLIBC_2.29 ispunct_l F
+GLIBC_2.29 isspace F
+GLIBC_2.29 isspace_l F
+GLIBC_2.29 isupper F
+GLIBC_2.29 isupper_l F
+GLIBC_2.29 iswalnum F
+GLIBC_2.29 iswalnum_l F
+GLIBC_2.29 iswalpha F
+GLIBC_2.29 iswalpha_l F
+GLIBC_2.29 iswblank F
+GLIBC_2.29 iswblank_l F
+GLIBC_2.29 iswcntrl F
+GLIBC_2.29 iswcntrl_l F
+GLIBC_2.29 iswctype F
+GLIBC_2.29 iswctype_l F
+GLIBC_2.29 iswdigit F
+GLIBC_2.29 iswdigit_l F
+GLIBC_2.29 iswgraph F
+GLIBC_2.29 iswgraph_l F
+GLIBC_2.29 iswlower F
+GLIBC_2.29 iswlower_l F
+GLIBC_2.29 iswprint F
+GLIBC_2.29 iswprint_l F
+GLIBC_2.29 iswpunct F
+GLIBC_2.29 iswpunct_l F
+GLIBC_2.29 iswspace F
+GLIBC_2.29 iswspace_l F
+GLIBC_2.29 iswupper F
+GLIBC_2.29 iswupper_l F
+GLIBC_2.29 iswxdigit F
+GLIBC_2.29 iswxdigit_l F
+GLIBC_2.29 isxdigit F
+GLIBC_2.29 isxdigit_l F
+GLIBC_2.29 jrand48 F
+GLIBC_2.29 jrand48_r F
+GLIBC_2.29 key_decryptsession F
+GLIBC_2.29 key_decryptsession_pk F
+GLIBC_2.29 key_encryptsession F
+GLIBC_2.29 key_encryptsession_pk F
+GLIBC_2.29 key_gendes F
+GLIBC_2.29 key_get_conv F
+GLIBC_2.29 key_secretkey_is_set F
+GLIBC_2.29 key_setnet F
+GLIBC_2.29 key_setsecret F
+GLIBC_2.29 kill F
+GLIBC_2.29 killpg F
+GLIBC_2.29 klogctl F
+GLIBC_2.29 l64a F
+GLIBC_2.29 labs F
+GLIBC_2.29 lchmod F
+GLIBC_2.29 lchown F
+GLIBC_2.29 lckpwdf F
+GLIBC_2.29 lcong48 F
+GLIBC_2.29 lcong48_r F
+GLIBC_2.29 ldexp F
+GLIBC_2.29 ldexpf F
+GLIBC_2.29 ldexpl F
+GLIBC_2.29 ldiv F
+GLIBC_2.29 lfind F
+GLIBC_2.29 lgetxattr F
+GLIBC_2.29 link F
+GLIBC_2.29 linkat F
+GLIBC_2.29 listen F
+GLIBC_2.29 listxattr F
+GLIBC_2.29 llabs F
+GLIBC_2.29 lldiv F
+GLIBC_2.29 llistxattr F
+GLIBC_2.29 localeconv F
+GLIBC_2.29 localtime F
+GLIBC_2.29 localtime_r F
+GLIBC_2.29 lockf F
+GLIBC_2.29 lockf64 F
+GLIBC_2.29 longjmp F
+GLIBC_2.29 lrand48 F
+GLIBC_2.29 lrand48_r F
+GLIBC_2.29 lremovexattr F
+GLIBC_2.29 lsearch F
+GLIBC_2.29 lseek F
+GLIBC_2.29 lseek64 F
+GLIBC_2.29 lsetxattr F
+GLIBC_2.29 lutimes F
+GLIBC_2.29 madvise F
+GLIBC_2.29 makecontext F
+GLIBC_2.29 mallinfo F
+GLIBC_2.29 malloc F
+GLIBC_2.29 malloc_info F
+GLIBC_2.29 malloc_stats F
+GLIBC_2.29 malloc_trim F
+GLIBC_2.29 malloc_usable_size F
+GLIBC_2.29 mallopt F
+GLIBC_2.29 mallwatch D 0x4
+GLIBC_2.29 mblen F
+GLIBC_2.29 mbrlen F
+GLIBC_2.29 mbrtoc16 F
+GLIBC_2.29 mbrtoc32 F
+GLIBC_2.29 mbrtowc F
+GLIBC_2.29 mbsinit F
+GLIBC_2.29 mbsnrtowcs F
+GLIBC_2.29 mbsrtowcs F
+GLIBC_2.29 mbstowcs F
+GLIBC_2.29 mbtowc F
+GLIBC_2.29 mcheck F
+GLIBC_2.29 mcheck_check_all F
+GLIBC_2.29 mcheck_pedantic F
+GLIBC_2.29 memalign F
+GLIBC_2.29 memccpy F
+GLIBC_2.29 memchr F
+GLIBC_2.29 memcmp F
+GLIBC_2.29 memcpy F
+GLIBC_2.29 memfd_create F
+GLIBC_2.29 memfrob F
+GLIBC_2.29 memmem F
+GLIBC_2.29 memmove F
+GLIBC_2.29 mempcpy F
+GLIBC_2.29 memrchr F
+GLIBC_2.29 memset F
+GLIBC_2.29 mincore F
+GLIBC_2.29 mkdir F
+GLIBC_2.29 mkdirat F
+GLIBC_2.29 mkdtemp F
+GLIBC_2.29 mkfifo F
+GLIBC_2.29 mkfifoat F
+GLIBC_2.29 mkostemp F
+GLIBC_2.29 mkostemp64 F
+GLIBC_2.29 mkostemps F
+GLIBC_2.29 mkostemps64 F
+GLIBC_2.29 mkstemp F
+GLIBC_2.29 mkstemp64 F
+GLIBC_2.29 mkstemps F
+GLIBC_2.29 mkstemps64 F
+GLIBC_2.29 mktemp F
+GLIBC_2.29 mktime F
+GLIBC_2.29 mlock F
+GLIBC_2.29 mlock2 F
+GLIBC_2.29 mlockall F
+GLIBC_2.29 mmap F
+GLIBC_2.29 mmap64 F
+GLIBC_2.29 modf F
+GLIBC_2.29 modff F
+GLIBC_2.29 modfl F
+GLIBC_2.29 moncontrol F
+GLIBC_2.29 monstartup F
+GLIBC_2.29 mount F
+GLIBC_2.29 mprobe F
+GLIBC_2.29 mprotect F
+GLIBC_2.29 mrand48 F
+GLIBC_2.29 mrand48_r F
+GLIBC_2.29 mremap F
+GLIBC_2.29 msgctl F
+GLIBC_2.29 msgget F
+GLIBC_2.29 msgrcv F
+GLIBC_2.29 msgsnd F
+GLIBC_2.29 msync F
+GLIBC_2.29 mtrace F
+GLIBC_2.29 munlock F
+GLIBC_2.29 munlockall F
+GLIBC_2.29 munmap F
+GLIBC_2.29 muntrace F
+GLIBC_2.29 name_to_handle_at F
+GLIBC_2.29 nanosleep F
+GLIBC_2.29 netname2host F
+GLIBC_2.29 netname2user F
+GLIBC_2.29 newlocale F
+GLIBC_2.29 nftw F
+GLIBC_2.29 nftw64 F
+GLIBC_2.29 ngettext F
+GLIBC_2.29 nice F
+GLIBC_2.29 nl_langinfo F
+GLIBC_2.29 nl_langinfo_l F
+GLIBC_2.29 nrand48 F
+GLIBC_2.29 nrand48_r F
+GLIBC_2.29 ntohl F
+GLIBC_2.29 ntohs F
+GLIBC_2.29 ntp_adjtime F
+GLIBC_2.29 ntp_gettime F
+GLIBC_2.29 ntp_gettimex F
+GLIBC_2.29 obstack_alloc_failed_handler D 0x4
+GLIBC_2.29 obstack_exit_failure D 0x4
+GLIBC_2.29 obstack_free F
+GLIBC_2.29 obstack_printf F
+GLIBC_2.29 obstack_vprintf F
+GLIBC_2.29 on_exit F
+GLIBC_2.29 open F
+GLIBC_2.29 open64 F
+GLIBC_2.29 open_by_handle_at F
+GLIBC_2.29 open_memstream F
+GLIBC_2.29 open_wmemstream F
+GLIBC_2.29 openat F
+GLIBC_2.29 openat64 F
+GLIBC_2.29 opendir F
+GLIBC_2.29 openlog F
+GLIBC_2.29 optarg D 0x4
+GLIBC_2.29 opterr D 0x4
+GLIBC_2.29 optind D 0x4
+GLIBC_2.29 optopt D 0x4
+GLIBC_2.29 parse_printf_format F
+GLIBC_2.29 passwd2des F
+GLIBC_2.29 pathconf F
+GLIBC_2.29 pause F
+GLIBC_2.29 pclose F
+GLIBC_2.29 perror F
+GLIBC_2.29 personality F
+GLIBC_2.29 pipe F
+GLIBC_2.29 pipe2 F
+GLIBC_2.29 pivot_root F
+GLIBC_2.29 pkey_alloc F
+GLIBC_2.29 pkey_free F
+GLIBC_2.29 pkey_get F
+GLIBC_2.29 pkey_mprotect F
+GLIBC_2.29 pkey_set F
+GLIBC_2.29 pmap_getmaps F
+GLIBC_2.29 pmap_getport F
+GLIBC_2.29 pmap_rmtcall F
+GLIBC_2.29 pmap_set F
+GLIBC_2.29 pmap_unset F
+GLIBC_2.29 poll F
+GLIBC_2.29 popen F
+GLIBC_2.29 posix_fadvise F
+GLIBC_2.29 posix_fadvise64 F
+GLIBC_2.29 posix_fallocate F
+GLIBC_2.29 posix_fallocate64 F
+GLIBC_2.29 posix_madvise F
+GLIBC_2.29 posix_memalign F
+GLIBC_2.29 posix_openpt F
+GLIBC_2.29 posix_spawn F
+GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
+GLIBC_2.29 posix_spawn_file_actions_addclose F
+GLIBC_2.29 posix_spawn_file_actions_adddup2 F
+GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
+GLIBC_2.29 posix_spawn_file_actions_addopen F
+GLIBC_2.29 posix_spawn_file_actions_destroy F
+GLIBC_2.29 posix_spawn_file_actions_init F
+GLIBC_2.29 posix_spawnattr_destroy F
+GLIBC_2.29 posix_spawnattr_getflags F
+GLIBC_2.29 posix_spawnattr_getpgroup F
+GLIBC_2.29 posix_spawnattr_getschedparam F
+GLIBC_2.29 posix_spawnattr_getschedpolicy F
+GLIBC_2.29 posix_spawnattr_getsigdefault F
+GLIBC_2.29 posix_spawnattr_getsigmask F
+GLIBC_2.29 posix_spawnattr_init F
+GLIBC_2.29 posix_spawnattr_setflags F
+GLIBC_2.29 posix_spawnattr_setpgroup F
+GLIBC_2.29 posix_spawnattr_setschedparam F
+GLIBC_2.29 posix_spawnattr_setschedpolicy F
+GLIBC_2.29 posix_spawnattr_setsigdefault F
+GLIBC_2.29 posix_spawnattr_setsigmask F
+GLIBC_2.29 posix_spawnp F
+GLIBC_2.29 ppoll F
+GLIBC_2.29 prctl F
+GLIBC_2.29 pread F
+GLIBC_2.29 pread64 F
+GLIBC_2.29 preadv F
+GLIBC_2.29 preadv2 F
+GLIBC_2.29 preadv64 F
+GLIBC_2.29 preadv64v2 F
+GLIBC_2.29 printf F
+GLIBC_2.29 printf_size F
+GLIBC_2.29 printf_size_info F
+GLIBC_2.29 prlimit F
+GLIBC_2.29 prlimit64 F
+GLIBC_2.29 process_vm_readv F
+GLIBC_2.29 process_vm_writev F
+GLIBC_2.29 profil F
+GLIBC_2.29 program_invocation_name D 0x4
+GLIBC_2.29 program_invocation_short_name D 0x4
+GLIBC_2.29 pselect F
+GLIBC_2.29 psiginfo F
+GLIBC_2.29 psignal F
+GLIBC_2.29 pthread_attr_destroy F
+GLIBC_2.29 pthread_attr_getdetachstate F
+GLIBC_2.29 pthread_attr_getinheritsched F
+GLIBC_2.29 pthread_attr_getschedparam F
+GLIBC_2.29 pthread_attr_getschedpolicy F
+GLIBC_2.29 pthread_attr_getscope F
+GLIBC_2.29 pthread_attr_init F
+GLIBC_2.29 pthread_attr_setdetachstate F
+GLIBC_2.29 pthread_attr_setinheritsched F
+GLIBC_2.29 pthread_attr_setschedparam F
+GLIBC_2.29 pthread_attr_setschedpolicy F
+GLIBC_2.29 pthread_attr_setscope F
+GLIBC_2.29 pthread_cond_broadcast F
+GLIBC_2.29 pthread_cond_destroy F
+GLIBC_2.29 pthread_cond_init F
+GLIBC_2.29 pthread_cond_signal F
+GLIBC_2.29 pthread_cond_timedwait F
+GLIBC_2.29 pthread_cond_wait F
+GLIBC_2.29 pthread_condattr_destroy F
+GLIBC_2.29 pthread_condattr_init F
+GLIBC_2.29 pthread_equal F
+GLIBC_2.29 pthread_exit F
+GLIBC_2.29 pthread_getschedparam F
+GLIBC_2.29 pthread_mutex_destroy F
+GLIBC_2.29 pthread_mutex_init F
+GLIBC_2.29 pthread_mutex_lock F
+GLIBC_2.29 pthread_mutex_unlock F
+GLIBC_2.29 pthread_self F
+GLIBC_2.29 pthread_setcancelstate F
+GLIBC_2.29 pthread_setcanceltype F
+GLIBC_2.29 pthread_setschedparam F
+GLIBC_2.29 ptrace F
+GLIBC_2.29 ptsname F
+GLIBC_2.29 ptsname_r F
+GLIBC_2.29 putc F
+GLIBC_2.29 putc_unlocked F
+GLIBC_2.29 putchar F
+GLIBC_2.29 putchar_unlocked F
+GLIBC_2.29 putenv F
+GLIBC_2.29 putgrent F
+GLIBC_2.29 putmsg F
+GLIBC_2.29 putpmsg F
+GLIBC_2.29 putpwent F
+GLIBC_2.29 puts F
+GLIBC_2.29 putsgent F
+GLIBC_2.29 putspent F
+GLIBC_2.29 pututline F
+GLIBC_2.29 pututxline F
+GLIBC_2.29 putw F
+GLIBC_2.29 putwc F
+GLIBC_2.29 putwc_unlocked F
+GLIBC_2.29 putwchar F
+GLIBC_2.29 putwchar_unlocked F
+GLIBC_2.29 pvalloc F
+GLIBC_2.29 pwrite F
+GLIBC_2.29 pwrite64 F
+GLIBC_2.29 pwritev F
+GLIBC_2.29 pwritev2 F
+GLIBC_2.29 pwritev64 F
+GLIBC_2.29 pwritev64v2 F
+GLIBC_2.29 qecvt F
+GLIBC_2.29 qecvt_r F
+GLIBC_2.29 qfcvt F
+GLIBC_2.29 qfcvt_r F
+GLIBC_2.29 qgcvt F
+GLIBC_2.29 qsort F
+GLIBC_2.29 qsort_r F
+GLIBC_2.29 quick_exit F
+GLIBC_2.29 quotactl F
+GLIBC_2.29 raise F
+GLIBC_2.29 rand F
+GLIBC_2.29 rand_r F
+GLIBC_2.29 random F
+GLIBC_2.29 random_r F
+GLIBC_2.29 rawmemchr F
+GLIBC_2.29 rcmd F
+GLIBC_2.29 rcmd_af F
+GLIBC_2.29 re_comp F
+GLIBC_2.29 re_compile_fastmap F
+GLIBC_2.29 re_compile_pattern F
+GLIBC_2.29 re_exec F
+GLIBC_2.29 re_match F
+GLIBC_2.29 re_match_2 F
+GLIBC_2.29 re_search F
+GLIBC_2.29 re_search_2 F
+GLIBC_2.29 re_set_registers F
+GLIBC_2.29 re_set_syntax F
+GLIBC_2.29 re_syntax_options D 0x4
+GLIBC_2.29 read F
+GLIBC_2.29 readahead F
+GLIBC_2.29 readdir F
+GLIBC_2.29 readdir64 F
+GLIBC_2.29 readdir64_r F
+GLIBC_2.29 readdir_r F
+GLIBC_2.29 readlink F
+GLIBC_2.29 readlinkat F
+GLIBC_2.29 readv F
+GLIBC_2.29 realloc F
+GLIBC_2.29 reallocarray F
+GLIBC_2.29 realpath F
+GLIBC_2.29 reboot F
+GLIBC_2.29 recv F
+GLIBC_2.29 recvfrom F
+GLIBC_2.29 recvmmsg F
+GLIBC_2.29 recvmsg F
+GLIBC_2.29 regcomp F
+GLIBC_2.29 regerror F
+GLIBC_2.29 regexec F
+GLIBC_2.29 regfree F
+GLIBC_2.29 register_printf_function F
+GLIBC_2.29 register_printf_modifier F
+GLIBC_2.29 register_printf_specifier F
+GLIBC_2.29 register_printf_type F
+GLIBC_2.29 registerrpc F
+GLIBC_2.29 remap_file_pages F
+GLIBC_2.29 remove F
+GLIBC_2.29 removexattr F
+GLIBC_2.29 remque F
+GLIBC_2.29 rename F
+GLIBC_2.29 renameat F
+GLIBC_2.29 renameat2 F
+GLIBC_2.29 revoke F
+GLIBC_2.29 rewind F
+GLIBC_2.29 rewinddir F
+GLIBC_2.29 rexec F
+GLIBC_2.29 rexec_af F
+GLIBC_2.29 rexecoptions D 0x4
+GLIBC_2.29 rindex F
+GLIBC_2.29 rmdir F
+GLIBC_2.29 rpc_createerr D 0x10
+GLIBC_2.29 rpmatch F
+GLIBC_2.29 rresvport F
+GLIBC_2.29 rresvport_af F
+GLIBC_2.29 rtime F
+GLIBC_2.29 ruserok F
+GLIBC_2.29 ruserok_af F
+GLIBC_2.29 ruserpass F
+GLIBC_2.29 sbrk F
+GLIBC_2.29 scalbn F
+GLIBC_2.29 scalbnf F
+GLIBC_2.29 scalbnl F
+GLIBC_2.29 scandir F
+GLIBC_2.29 scandir64 F
+GLIBC_2.29 scandirat F
+GLIBC_2.29 scandirat64 F
+GLIBC_2.29 scanf F
+GLIBC_2.29 sched_get_priority_max F
+GLIBC_2.29 sched_get_priority_min F
+GLIBC_2.29 sched_getaffinity F
+GLIBC_2.29 sched_getcpu F
+GLIBC_2.29 sched_getparam F
+GLIBC_2.29 sched_getscheduler F
+GLIBC_2.29 sched_rr_get_interval F
+GLIBC_2.29 sched_setaffinity F
+GLIBC_2.29 sched_setparam F
+GLIBC_2.29 sched_setscheduler F
+GLIBC_2.29 sched_yield F
+GLIBC_2.29 secure_getenv F
+GLIBC_2.29 seed48 F
+GLIBC_2.29 seed48_r F
+GLIBC_2.29 seekdir F
+GLIBC_2.29 select F
+GLIBC_2.29 semctl F
+GLIBC_2.29 semget F
+GLIBC_2.29 semop F
+GLIBC_2.29 semtimedop F
+GLIBC_2.29 send F
+GLIBC_2.29 sendfile F
+GLIBC_2.29 sendfile64 F
+GLIBC_2.29 sendmmsg F
+GLIBC_2.29 sendmsg F
+GLIBC_2.29 sendto F
+GLIBC_2.29 setaliasent F
+GLIBC_2.29 setbuf F
+GLIBC_2.29 setbuffer F
+GLIBC_2.29 setcontext F
+GLIBC_2.29 setdomainname F
+GLIBC_2.29 setegid F
+GLIBC_2.29 setenv F
+GLIBC_2.29 seteuid F
+GLIBC_2.29 setfsent F
+GLIBC_2.29 setfsgid F
+GLIBC_2.29 setfsuid F
+GLIBC_2.29 setgid F
+GLIBC_2.29 setgrent F
+GLIBC_2.29 setgroups F
+GLIBC_2.29 sethostent F
+GLIBC_2.29 sethostid F
+GLIBC_2.29 sethostname F
+GLIBC_2.29 setipv4sourcefilter F
+GLIBC_2.29 setitimer F
+GLIBC_2.29 setjmp F
+GLIBC_2.29 setlinebuf F
+GLIBC_2.29 setlocale F
+GLIBC_2.29 setlogin F
+GLIBC_2.29 setlogmask F
+GLIBC_2.29 setmntent F
+GLIBC_2.29 setnetent F
+GLIBC_2.29 setnetgrent F
+GLIBC_2.29 setns F
+GLIBC_2.29 setpgid F
+GLIBC_2.29 setpgrp F
+GLIBC_2.29 setpriority F
+GLIBC_2.29 setprotoent F
+GLIBC_2.29 setpwent F
+GLIBC_2.29 setregid F
+GLIBC_2.29 setresgid F
+GLIBC_2.29 setresuid F
+GLIBC_2.29 setreuid F
+GLIBC_2.29 setrlimit F
+GLIBC_2.29 setrlimit64 F
+GLIBC_2.29 setrpcent F
+GLIBC_2.29 setservent F
+GLIBC_2.29 setsgent F
+GLIBC_2.29 setsid F
+GLIBC_2.29 setsockopt F
+GLIBC_2.29 setsourcefilter F
+GLIBC_2.29 setspent F
+GLIBC_2.29 setstate F
+GLIBC_2.29 setstate_r F
+GLIBC_2.29 settimeofday F
+GLIBC_2.29 setttyent F
+GLIBC_2.29 setuid F
+GLIBC_2.29 setusershell F
+GLIBC_2.29 setutent F
+GLIBC_2.29 setutxent F
+GLIBC_2.29 setvbuf F
+GLIBC_2.29 setxattr F
+GLIBC_2.29 sgetsgent F
+GLIBC_2.29 sgetsgent_r F
+GLIBC_2.29 sgetspent F
+GLIBC_2.29 sgetspent_r F
+GLIBC_2.29 shmat F
+GLIBC_2.29 shmctl F
+GLIBC_2.29 shmdt F
+GLIBC_2.29 shmget F
+GLIBC_2.29 shutdown F
+GLIBC_2.29 sigaction F
+GLIBC_2.29 sigaddset F
+GLIBC_2.29 sigaltstack F
+GLIBC_2.29 sigandset F
+GLIBC_2.29 sigblock F
+GLIBC_2.29 sigdelset F
+GLIBC_2.29 sigemptyset F
+GLIBC_2.29 sigfillset F
+GLIBC_2.29 siggetmask F
+GLIBC_2.29 sighold F
+GLIBC_2.29 sigignore F
+GLIBC_2.29 siginterrupt F
+GLIBC_2.29 sigisemptyset F
+GLIBC_2.29 sigismember F
+GLIBC_2.29 siglongjmp F
+GLIBC_2.29 signal F
+GLIBC_2.29 signalfd F
+GLIBC_2.29 sigorset F
+GLIBC_2.29 sigpause F
+GLIBC_2.29 sigpending F
+GLIBC_2.29 sigprocmask F
+GLIBC_2.29 sigqueue F
+GLIBC_2.29 sigrelse F
+GLIBC_2.29 sigreturn F
+GLIBC_2.29 sigset F
+GLIBC_2.29 sigsetmask F
+GLIBC_2.29 sigstack F
+GLIBC_2.29 sigsuspend F
+GLIBC_2.29 sigtimedwait F
+GLIBC_2.29 sigwait F
+GLIBC_2.29 sigwaitinfo F
+GLIBC_2.29 sleep F
+GLIBC_2.29 snprintf F
+GLIBC_2.29 sockatmark F
+GLIBC_2.29 socket F
+GLIBC_2.29 socketpair F
+GLIBC_2.29 splice F
+GLIBC_2.29 sprintf F
+GLIBC_2.29 sprofil F
+GLIBC_2.29 srand F
+GLIBC_2.29 srand48 F
+GLIBC_2.29 srand48_r F
+GLIBC_2.29 srandom F
+GLIBC_2.29 srandom_r F
+GLIBC_2.29 sscanf F
+GLIBC_2.29 ssignal F
+GLIBC_2.29 sstk F
+GLIBC_2.29 statfs F
+GLIBC_2.29 statfs64 F
+GLIBC_2.29 statvfs F
+GLIBC_2.29 statvfs64 F
+GLIBC_2.29 statx F
+GLIBC_2.29 stderr D 0x4
+GLIBC_2.29 stdin D 0x4
+GLIBC_2.29 stdout D 0x4
+GLIBC_2.29 stime F
+GLIBC_2.29 stpcpy F
+GLIBC_2.29 stpncpy F
+GLIBC_2.29 strcasecmp F
+GLIBC_2.29 strcasecmp_l F
+GLIBC_2.29 strcasestr F
+GLIBC_2.29 strcat F
+GLIBC_2.29 strchr F
+GLIBC_2.29 strchrnul F
+GLIBC_2.29 strcmp F
+GLIBC_2.29 strcoll F
+GLIBC_2.29 strcoll_l F
+GLIBC_2.29 strcpy F
+GLIBC_2.29 strcspn F
+GLIBC_2.29 strdup F
+GLIBC_2.29 strerror F
+GLIBC_2.29 strerror_l F
+GLIBC_2.29 strerror_r F
+GLIBC_2.29 strfmon F
+GLIBC_2.29 strfmon_l F
+GLIBC_2.29 strfromd F
+GLIBC_2.29 strfromf F
+GLIBC_2.29 strfromf32 F
+GLIBC_2.29 strfromf32x F
+GLIBC_2.29 strfromf64 F
+GLIBC_2.29 strfroml F
+GLIBC_2.29 strfry F
+GLIBC_2.29 strftime F
+GLIBC_2.29 strftime_l F
+GLIBC_2.29 strlen F
+GLIBC_2.29 strncasecmp F
+GLIBC_2.29 strncasecmp_l F
+GLIBC_2.29 strncat F
+GLIBC_2.29 strncmp F
+GLIBC_2.29 strncpy F
+GLIBC_2.29 strndup F
+GLIBC_2.29 strnlen F
+GLIBC_2.29 strpbrk F
+GLIBC_2.29 strptime F
+GLIBC_2.29 strptime_l F
+GLIBC_2.29 strrchr F
+GLIBC_2.29 strsep F
+GLIBC_2.29 strsignal F
+GLIBC_2.29 strspn F
+GLIBC_2.29 strstr F
+GLIBC_2.29 strtod F
+GLIBC_2.29 strtod_l F
+GLIBC_2.29 strtof F
+GLIBC_2.29 strtof32 F
+GLIBC_2.29 strtof32_l F
+GLIBC_2.29 strtof32x F
+GLIBC_2.29 strtof32x_l F
+GLIBC_2.29 strtof64 F
+GLIBC_2.29 strtof64_l F
+GLIBC_2.29 strtof_l F
+GLIBC_2.29 strtoimax F
+GLIBC_2.29 strtok F
+GLIBC_2.29 strtok_r F
+GLIBC_2.29 strtol F
+GLIBC_2.29 strtol_l F
+GLIBC_2.29 strtold F
+GLIBC_2.29 strtold_l F
+GLIBC_2.29 strtoll F
+GLIBC_2.29 strtoll_l F
+GLIBC_2.29 strtoq F
+GLIBC_2.29 strtoul F
+GLIBC_2.29 strtoul_l F
+GLIBC_2.29 strtoull F
+GLIBC_2.29 strtoull_l F
+GLIBC_2.29 strtoumax F
+GLIBC_2.29 strtouq F
+GLIBC_2.29 strverscmp F
+GLIBC_2.29 strxfrm F
+GLIBC_2.29 strxfrm_l F
+GLIBC_2.29 stty F
+GLIBC_2.29 svc_exit F
+GLIBC_2.29 svc_fdset D 0x80
+GLIBC_2.29 svc_getreq F
+GLIBC_2.29 svc_getreq_common F
+GLIBC_2.29 svc_getreq_poll F
+GLIBC_2.29 svc_getreqset F
+GLIBC_2.29 svc_max_pollfd D 0x4
+GLIBC_2.29 svc_pollfd D 0x4
+GLIBC_2.29 svc_register F
+GLIBC_2.29 svc_run F
+GLIBC_2.29 svc_sendreply F
+GLIBC_2.29 svc_unregister F
+GLIBC_2.29 svcauthdes_stats D 0xc
+GLIBC_2.29 svcerr_auth F
+GLIBC_2.29 svcerr_decode F
+GLIBC_2.29 svcerr_noproc F
+GLIBC_2.29 svcerr_noprog F
+GLIBC_2.29 svcerr_progvers F
+GLIBC_2.29 svcerr_systemerr F
+GLIBC_2.29 svcerr_weakauth F
+GLIBC_2.29 svcfd_create F
+GLIBC_2.29 svcraw_create F
+GLIBC_2.29 svctcp_create F
+GLIBC_2.29 svcudp_bufcreate F
+GLIBC_2.29 svcudp_create F
+GLIBC_2.29 svcudp_enablecache F
+GLIBC_2.29 svcunix_create F
+GLIBC_2.29 svcunixfd_create F
+GLIBC_2.29 swab F
+GLIBC_2.29 swapcontext F
+GLIBC_2.29 swapoff F
+GLIBC_2.29 swapon F
+GLIBC_2.29 swprintf F
+GLIBC_2.29 swscanf F
+GLIBC_2.29 symlink F
+GLIBC_2.29 symlinkat F
+GLIBC_2.29 sync F
+GLIBC_2.29 sync_file_range F
+GLIBC_2.29 syncfs F
+GLIBC_2.29 sys_errlist D 0x21c
+GLIBC_2.29 sys_nerr D 0x4
+GLIBC_2.29 sys_sigabbrev D 0x104
+GLIBC_2.29 sys_siglist D 0x104
+GLIBC_2.29 syscall F
+GLIBC_2.29 sysconf F
+GLIBC_2.29 sysctl F
+GLIBC_2.29 sysinfo F
+GLIBC_2.29 syslog F
+GLIBC_2.29 system F
+GLIBC_2.29 sysv_signal F
+GLIBC_2.29 tcdrain F
+GLIBC_2.29 tcflow F
+GLIBC_2.29 tcflush F
+GLIBC_2.29 tcgetattr F
+GLIBC_2.29 tcgetpgrp F
+GLIBC_2.29 tcgetsid F
+GLIBC_2.29 tcsendbreak F
+GLIBC_2.29 tcsetattr F
+GLIBC_2.29 tcsetpgrp F
+GLIBC_2.29 tdelete F
+GLIBC_2.29 tdestroy F
+GLIBC_2.29 tee F
+GLIBC_2.29 telldir F
+GLIBC_2.29 tempnam F
+GLIBC_2.29 textdomain F
+GLIBC_2.29 tfind F
+GLIBC_2.29 thrd_current F
+GLIBC_2.29 thrd_equal F
+GLIBC_2.29 thrd_sleep F
+GLIBC_2.29 thrd_yield F
+GLIBC_2.29 time F
+GLIBC_2.29 timegm F
+GLIBC_2.29 timelocal F
+GLIBC_2.29 timerfd_create F
+GLIBC_2.29 timerfd_gettime F
+GLIBC_2.29 timerfd_settime F
+GLIBC_2.29 times F
+GLIBC_2.29 timespec_get F
+GLIBC_2.29 timezone D 0x4
+GLIBC_2.29 tmpfile F
+GLIBC_2.29 tmpfile64 F
+GLIBC_2.29 tmpnam F
+GLIBC_2.29 tmpnam_r F
+GLIBC_2.29 toascii F
+GLIBC_2.29 tolower F
+GLIBC_2.29 tolower_l F
+GLIBC_2.29 toupper F
+GLIBC_2.29 toupper_l F
+GLIBC_2.29 towctrans F
+GLIBC_2.29 towctrans_l F
+GLIBC_2.29 towlower F
+GLIBC_2.29 towlower_l F
+GLIBC_2.29 towupper F
+GLIBC_2.29 towupper_l F
+GLIBC_2.29 tr_break F
+GLIBC_2.29 truncate F
+GLIBC_2.29 truncate64 F
+GLIBC_2.29 tsearch F
+GLIBC_2.29 ttyname F
+GLIBC_2.29 ttyname_r F
+GLIBC_2.29 ttyslot F
+GLIBC_2.29 twalk F
+GLIBC_2.29 tzname D 0x8
+GLIBC_2.29 tzset F
+GLIBC_2.29 ualarm F
+GLIBC_2.29 ulckpwdf F
+GLIBC_2.29 ulimit F
+GLIBC_2.29 umask F
+GLIBC_2.29 umount F
+GLIBC_2.29 umount2 F
+GLIBC_2.29 uname F
+GLIBC_2.29 ungetc F
+GLIBC_2.29 ungetwc F
+GLIBC_2.29 unlink F
+GLIBC_2.29 unlinkat F
+GLIBC_2.29 unlockpt F
+GLIBC_2.29 unsetenv F
+GLIBC_2.29 unshare F
+GLIBC_2.29 updwtmp F
+GLIBC_2.29 updwtmpx F
+GLIBC_2.29 uselocale F
+GLIBC_2.29 user2netname F
+GLIBC_2.29 usleep F
+GLIBC_2.29 utime F
+GLIBC_2.29 utimensat F
+GLIBC_2.29 utimes F
+GLIBC_2.29 utmpname F
+GLIBC_2.29 utmpxname F
+GLIBC_2.29 valloc F
+GLIBC_2.29 vasprintf F
+GLIBC_2.29 vdprintf F
+GLIBC_2.29 verr F
+GLIBC_2.29 verrx F
+GLIBC_2.29 versionsort F
+GLIBC_2.29 versionsort64 F
+GLIBC_2.29 vfork F
+GLIBC_2.29 vfprintf F
+GLIBC_2.29 vfscanf F
+GLIBC_2.29 vfwprintf F
+GLIBC_2.29 vfwscanf F
+GLIBC_2.29 vhangup F
+GLIBC_2.29 vlimit F
+GLIBC_2.29 vmsplice F
+GLIBC_2.29 vprintf F
+GLIBC_2.29 vscanf F
+GLIBC_2.29 vsnprintf F
+GLIBC_2.29 vsprintf F
+GLIBC_2.29 vsscanf F
+GLIBC_2.29 vswprintf F
+GLIBC_2.29 vswscanf F
+GLIBC_2.29 vsyslog F
+GLIBC_2.29 vtimes F
+GLIBC_2.29 vwarn F
+GLIBC_2.29 vwarnx F
+GLIBC_2.29 vwprintf F
+GLIBC_2.29 vwscanf F
+GLIBC_2.29 wait F
+GLIBC_2.29 wait3 F
+GLIBC_2.29 wait4 F
+GLIBC_2.29 waitid F
+GLIBC_2.29 waitpid F
+GLIBC_2.29 warn F
+GLIBC_2.29 warnx F
+GLIBC_2.29 wcpcpy F
+GLIBC_2.29 wcpncpy F
+GLIBC_2.29 wcrtomb F
+GLIBC_2.29 wcscasecmp F
+GLIBC_2.29 wcscasecmp_l F
+GLIBC_2.29 wcscat F
+GLIBC_2.29 wcschr F
+GLIBC_2.29 wcschrnul F
+GLIBC_2.29 wcscmp F
+GLIBC_2.29 wcscoll F
+GLIBC_2.29 wcscoll_l F
+GLIBC_2.29 wcscpy F
+GLIBC_2.29 wcscspn F
+GLIBC_2.29 wcsdup F
+GLIBC_2.29 wcsftime F
+GLIBC_2.29 wcsftime_l F
+GLIBC_2.29 wcslen F
+GLIBC_2.29 wcsncasecmp F
+GLIBC_2.29 wcsncasecmp_l F
+GLIBC_2.29 wcsncat F
+GLIBC_2.29 wcsncmp F
+GLIBC_2.29 wcsncpy F
+GLIBC_2.29 wcsnlen F
+GLIBC_2.29 wcsnrtombs F
+GLIBC_2.29 wcspbrk F
+GLIBC_2.29 wcsrchr F
+GLIBC_2.29 wcsrtombs F
+GLIBC_2.29 wcsspn F
+GLIBC_2.29 wcsstr F
+GLIBC_2.29 wcstod F
+GLIBC_2.29 wcstod_l F
+GLIBC_2.29 wcstof F
+GLIBC_2.29 wcstof32 F
+GLIBC_2.29 wcstof32_l F
+GLIBC_2.29 wcstof32x F
+GLIBC_2.29 wcstof32x_l F
+GLIBC_2.29 wcstof64 F
+GLIBC_2.29 wcstof64_l F
+GLIBC_2.29 wcstof_l F
+GLIBC_2.29 wcstoimax F
+GLIBC_2.29 wcstok F
+GLIBC_2.29 wcstol F
+GLIBC_2.29 wcstol_l F
+GLIBC_2.29 wcstold F
+GLIBC_2.29 wcstold_l F
+GLIBC_2.29 wcstoll F
+GLIBC_2.29 wcstoll_l F
+GLIBC_2.29 wcstombs F
+GLIBC_2.29 wcstoq F
+GLIBC_2.29 wcstoul F
+GLIBC_2.29 wcstoul_l F
+GLIBC_2.29 wcstoull F
+GLIBC_2.29 wcstoull_l F
+GLIBC_2.29 wcstoumax F
+GLIBC_2.29 wcstouq F
+GLIBC_2.29 wcswcs F
+GLIBC_2.29 wcswidth F
+GLIBC_2.29 wcsxfrm F
+GLIBC_2.29 wcsxfrm_l F
+GLIBC_2.29 wctob F
+GLIBC_2.29 wctomb F
+GLIBC_2.29 wctrans F
+GLIBC_2.29 wctrans_l F
+GLIBC_2.29 wctype F
+GLIBC_2.29 wctype_l F
+GLIBC_2.29 wcwidth F
+GLIBC_2.29 wmemchr F
+GLIBC_2.29 wmemcmp F
+GLIBC_2.29 wmemcpy F
+GLIBC_2.29 wmemmove F
+GLIBC_2.29 wmempcpy F
+GLIBC_2.29 wmemset F
+GLIBC_2.29 wordexp F
+GLIBC_2.29 wordfree F
+GLIBC_2.29 wprintf F
+GLIBC_2.29 write F
+GLIBC_2.29 writev F
+GLIBC_2.29 wscanf F
+GLIBC_2.29 xdecrypt F
+GLIBC_2.29 xdr_accepted_reply F
+GLIBC_2.29 xdr_array F
+GLIBC_2.29 xdr_authdes_cred F
+GLIBC_2.29 xdr_authdes_verf F
+GLIBC_2.29 xdr_authunix_parms F
+GLIBC_2.29 xdr_bool F
+GLIBC_2.29 xdr_bytes F
+GLIBC_2.29 xdr_callhdr F
+GLIBC_2.29 xdr_callmsg F
+GLIBC_2.29 xdr_char F
+GLIBC_2.29 xdr_cryptkeyarg F
+GLIBC_2.29 xdr_cryptkeyarg2 F
+GLIBC_2.29 xdr_cryptkeyres F
+GLIBC_2.29 xdr_des_block F
+GLIBC_2.29 xdr_double F
+GLIBC_2.29 xdr_enum F
+GLIBC_2.29 xdr_float F
+GLIBC_2.29 xdr_free F
+GLIBC_2.29 xdr_getcredres F
+GLIBC_2.29 xdr_hyper F
+GLIBC_2.29 xdr_int F
+GLIBC_2.29 xdr_int16_t F
+GLIBC_2.29 xdr_int32_t F
+GLIBC_2.29 xdr_int64_t F
+GLIBC_2.29 xdr_int8_t F
+GLIBC_2.29 xdr_key_netstarg F
+GLIBC_2.29 xdr_key_netstres F
+GLIBC_2.29 xdr_keybuf F
+GLIBC_2.29 xdr_keystatus F
+GLIBC_2.29 xdr_long F
+GLIBC_2.29 xdr_longlong_t F
+GLIBC_2.29 xdr_netnamestr F
+GLIBC_2.29 xdr_netobj F
+GLIBC_2.29 xdr_opaque F
+GLIBC_2.29 xdr_opaque_auth F
+GLIBC_2.29 xdr_pmap F
+GLIBC_2.29 xdr_pmaplist F
+GLIBC_2.29 xdr_pointer F
+GLIBC_2.29 xdr_quad_t F
+GLIBC_2.29 xdr_reference F
+GLIBC_2.29 xdr_rejected_reply F
+GLIBC_2.29 xdr_replymsg F
+GLIBC_2.29 xdr_rmtcall_args F
+GLIBC_2.29 xdr_rmtcallres F
+GLIBC_2.29 xdr_short F
+GLIBC_2.29 xdr_sizeof F
+GLIBC_2.29 xdr_string F
+GLIBC_2.29 xdr_u_char F
+GLIBC_2.29 xdr_u_hyper F
+GLIBC_2.29 xdr_u_int F
+GLIBC_2.29 xdr_u_long F
+GLIBC_2.29 xdr_u_longlong_t F
+GLIBC_2.29 xdr_u_quad_t F
+GLIBC_2.29 xdr_u_short F
+GLIBC_2.29 xdr_uint16_t F
+GLIBC_2.29 xdr_uint32_t F
+GLIBC_2.29 xdr_uint64_t F
+GLIBC_2.29 xdr_uint8_t F
+GLIBC_2.29 xdr_union F
+GLIBC_2.29 xdr_unixcred F
+GLIBC_2.29 xdr_vector F
+GLIBC_2.29 xdr_void F
+GLIBC_2.29 xdr_wrapstring F
+GLIBC_2.29 xdrmem_create F
+GLIBC_2.29 xdrrec_create F
+GLIBC_2.29 xdrrec_endofrecord F
+GLIBC_2.29 xdrrec_eof F
+GLIBC_2.29 xdrrec_skiprecord F
+GLIBC_2.29 xdrstdio_create F
+GLIBC_2.29 xencrypt F
+GLIBC_2.29 xprt_register F
+GLIBC_2.29 xprt_unregister F
diff --git a/sysdeps/unix/sysv/linux/arc/libcrypt.abilist b/sysdeps/unix/sysv/linux/arc/libcrypt.abilist
new file mode 100644
index 000000000000..da3abbf8fb89
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libcrypt.abilist
@@ -0,0 +1,2 @@
+GLIBC_2.29 crypt F
+GLIBC_2.29 crypt_r F
diff --git a/sysdeps/unix/sysv/linux/arc/libdl.abilist b/sysdeps/unix/sysv/linux/arc/libdl.abilist
new file mode 100644
index 000000000000..8fcb609ddcfa
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libdl.abilist
@@ -0,0 +1,9 @@
+GLIBC_2.29 dladdr F
+GLIBC_2.29 dladdr1 F
+GLIBC_2.29 dlclose F
+GLIBC_2.29 dlerror F
+GLIBC_2.29 dlinfo F
+GLIBC_2.29 dlmopen F
+GLIBC_2.29 dlopen F
+GLIBC_2.29 dlsym F
+GLIBC_2.29 dlvsym F
diff --git a/sysdeps/unix/sysv/linux/arc/libm.abilist b/sysdeps/unix/sysv/linux/arc/libm.abilist
new file mode 100644
index 000000000000..497f62264475
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libm.abilist
@@ -0,0 +1,753 @@
+GLIBC_2.29 __acos_finite F
+GLIBC_2.29 __acosf_finite F
+GLIBC_2.29 __acosh_finite F
+GLIBC_2.29 __acoshf_finite F
+GLIBC_2.29 __asin_finite F
+GLIBC_2.29 __asinf_finite F
+GLIBC_2.29 __atan2_finite F
+GLIBC_2.29 __atan2f_finite F
+GLIBC_2.29 __atanh_finite F
+GLIBC_2.29 __atanhf_finite F
+GLIBC_2.29 __clog10 F
+GLIBC_2.29 __clog10f F
+GLIBC_2.29 __clog10l F
+GLIBC_2.29 __cosh_finite F
+GLIBC_2.29 __coshf_finite F
+GLIBC_2.29 __exp10_finite F
+GLIBC_2.29 __exp10f_finite F
+GLIBC_2.29 __exp2_finite F
+GLIBC_2.29 __exp2f_finite F
+GLIBC_2.29 __exp_finite F
+GLIBC_2.29 __expf_finite F
+GLIBC_2.29 __finite F
+GLIBC_2.29 __finitef F
+GLIBC_2.29 __fmod_finite F
+GLIBC_2.29 __fmodf_finite F
+GLIBC_2.29 __fpclassify F
+GLIBC_2.29 __fpclassifyf F
+GLIBC_2.29 __gamma_r_finite F
+GLIBC_2.29 __gammaf_r_finite F
+GLIBC_2.29 __hypot_finite F
+GLIBC_2.29 __hypotf_finite F
+GLIBC_2.29 __iseqsig F
+GLIBC_2.29 __iseqsigf F
+GLIBC_2.29 __issignaling F
+GLIBC_2.29 __issignalingf F
+GLIBC_2.29 __j0_finite F
+GLIBC_2.29 __j0f_finite F
+GLIBC_2.29 __j1_finite F
+GLIBC_2.29 __j1f_finite F
+GLIBC_2.29 __jn_finite F
+GLIBC_2.29 __jnf_finite F
+GLIBC_2.29 __lgamma_r_finite F
+GLIBC_2.29 __lgammaf_r_finite F
+GLIBC_2.29 __log10_finite F
+GLIBC_2.29 __log10f_finite F
+GLIBC_2.29 __log2_finite F
+GLIBC_2.29 __log2f_finite F
+GLIBC_2.29 __log_finite F
+GLIBC_2.29 __logf_finite F
+GLIBC_2.29 __pow_finite F
+GLIBC_2.29 __powf_finite F
+GLIBC_2.29 __remainder_finite F
+GLIBC_2.29 __remainderf_finite F
+GLIBC_2.29 __scalb_finite F
+GLIBC_2.29 __scalbf_finite F
+GLIBC_2.29 __signbit F
+GLIBC_2.29 __signbitf F
+GLIBC_2.29 __signgam D 0x4
+GLIBC_2.29 __sinh_finite F
+GLIBC_2.29 __sinhf_finite F
+GLIBC_2.29 __sqrt_finite F
+GLIBC_2.29 __sqrtf_finite F
+GLIBC_2.29 __y0_finite F
+GLIBC_2.29 __y0f_finite F
+GLIBC_2.29 __y1_finite F
+GLIBC_2.29 __y1f_finite F
+GLIBC_2.29 __yn_finite F
+GLIBC_2.29 __ynf_finite F
+GLIBC_2.29 acos F
+GLIBC_2.29 acosf F
+GLIBC_2.29 acosf32 F
+GLIBC_2.29 acosf32x F
+GLIBC_2.29 acosf64 F
+GLIBC_2.29 acosh F
+GLIBC_2.29 acoshf F
+GLIBC_2.29 acoshf32 F
+GLIBC_2.29 acoshf32x F
+GLIBC_2.29 acoshf64 F
+GLIBC_2.29 acoshl F
+GLIBC_2.29 acosl F
+GLIBC_2.29 asin F
+GLIBC_2.29 asinf F
+GLIBC_2.29 asinf32 F
+GLIBC_2.29 asinf32x F
+GLIBC_2.29 asinf64 F
+GLIBC_2.29 asinh F
+GLIBC_2.29 asinhf F
+GLIBC_2.29 asinhf32 F
+GLIBC_2.29 asinhf32x F
+GLIBC_2.29 asinhf64 F
+GLIBC_2.29 asinhl F
+GLIBC_2.29 asinl F
+GLIBC_2.29 atan F
+GLIBC_2.29 atan2 F
+GLIBC_2.29 atan2f F
+GLIBC_2.29 atan2f32 F
+GLIBC_2.29 atan2f32x F
+GLIBC_2.29 atan2f64 F
+GLIBC_2.29 atan2l F
+GLIBC_2.29 atanf F
+GLIBC_2.29 atanf32 F
+GLIBC_2.29 atanf32x F
+GLIBC_2.29 atanf64 F
+GLIBC_2.29 atanh F
+GLIBC_2.29 atanhf F
+GLIBC_2.29 atanhf32 F
+GLIBC_2.29 atanhf32x F
+GLIBC_2.29 atanhf64 F
+GLIBC_2.29 atanhl F
+GLIBC_2.29 atanl F
+GLIBC_2.29 cabs F
+GLIBC_2.29 cabsf F
+GLIBC_2.29 cabsf32 F
+GLIBC_2.29 cabsf32x F
+GLIBC_2.29 cabsf64 F
+GLIBC_2.29 cabsl F
+GLIBC_2.29 cacos F
+GLIBC_2.29 cacosf F
+GLIBC_2.29 cacosf32 F
+GLIBC_2.29 cacosf32x F
+GLIBC_2.29 cacosf64 F
+GLIBC_2.29 cacosh F
+GLIBC_2.29 cacoshf F
+GLIBC_2.29 cacoshf32 F
+GLIBC_2.29 cacoshf32x F
+GLIBC_2.29 cacoshf64 F
+GLIBC_2.29 cacoshl F
+GLIBC_2.29 cacosl F
+GLIBC_2.29 canonicalize F
+GLIBC_2.29 canonicalizef F
+GLIBC_2.29 canonicalizef32 F
+GLIBC_2.29 canonicalizef32x F
+GLIBC_2.29 canonicalizef64 F
+GLIBC_2.29 canonicalizel F
+GLIBC_2.29 carg F
+GLIBC_2.29 cargf F
+GLIBC_2.29 cargf32 F
+GLIBC_2.29 cargf32x F
+GLIBC_2.29 cargf64 F
+GLIBC_2.29 cargl F
+GLIBC_2.29 casin F
+GLIBC_2.29 casinf F
+GLIBC_2.29 casinf32 F
+GLIBC_2.29 casinf32x F
+GLIBC_2.29 casinf64 F
+GLIBC_2.29 casinh F
+GLIBC_2.29 casinhf F
+GLIBC_2.29 casinhf32 F
+GLIBC_2.29 casinhf32x F
+GLIBC_2.29 casinhf64 F
+GLIBC_2.29 casinhl F
+GLIBC_2.29 casinl F
+GLIBC_2.29 catan F
+GLIBC_2.29 catanf F
+GLIBC_2.29 catanf32 F
+GLIBC_2.29 catanf32x F
+GLIBC_2.29 catanf64 F
+GLIBC_2.29 catanh F
+GLIBC_2.29 catanhf F
+GLIBC_2.29 catanhf32 F
+GLIBC_2.29 catanhf32x F
+GLIBC_2.29 catanhf64 F
+GLIBC_2.29 catanhl F
+GLIBC_2.29 catanl F
+GLIBC_2.29 cbrt F
+GLIBC_2.29 cbrtf F
+GLIBC_2.29 cbrtf32 F
+GLIBC_2.29 cbrtf32x F
+GLIBC_2.29 cbrtf64 F
+GLIBC_2.29 cbrtl F
+GLIBC_2.29 ccos F
+GLIBC_2.29 ccosf F
+GLIBC_2.29 ccosf32 F
+GLIBC_2.29 ccosf32x F
+GLIBC_2.29 ccosf64 F
+GLIBC_2.29 ccosh F
+GLIBC_2.29 ccoshf F
+GLIBC_2.29 ccoshf32 F
+GLIBC_2.29 ccoshf32x F
+GLIBC_2.29 ccoshf64 F
+GLIBC_2.29 ccoshl F
+GLIBC_2.29 ccosl F
+GLIBC_2.29 ceil F
+GLIBC_2.29 ceilf F
+GLIBC_2.29 ceilf32 F
+GLIBC_2.29 ceilf32x F
+GLIBC_2.29 ceilf64 F
+GLIBC_2.29 ceill F
+GLIBC_2.29 cexp F
+GLIBC_2.29 cexpf F
+GLIBC_2.29 cexpf32 F
+GLIBC_2.29 cexpf32x F
+GLIBC_2.29 cexpf64 F
+GLIBC_2.29 cexpl F
+GLIBC_2.29 cimag F
+GLIBC_2.29 cimagf F
+GLIBC_2.29 cimagf32 F
+GLIBC_2.29 cimagf32x F
+GLIBC_2.29 cimagf64 F
+GLIBC_2.29 cimagl F
+GLIBC_2.29 clog F
+GLIBC_2.29 clog10 F
+GLIBC_2.29 clog10f F
+GLIBC_2.29 clog10f32 F
+GLIBC_2.29 clog10f32x F
+GLIBC_2.29 clog10f64 F
+GLIBC_2.29 clog10l F
+GLIBC_2.29 clogf F
+GLIBC_2.29 clogf32 F
+GLIBC_2.29 clogf32x F
+GLIBC_2.29 clogf64 F
+GLIBC_2.29 clogl F
+GLIBC_2.29 conj F
+GLIBC_2.29 conjf F
+GLIBC_2.29 conjf32 F
+GLIBC_2.29 conjf32x F
+GLIBC_2.29 conjf64 F
+GLIBC_2.29 conjl F
+GLIBC_2.29 copysign F
+GLIBC_2.29 copysignf F
+GLIBC_2.29 copysignf32 F
+GLIBC_2.29 copysignf32x F
+GLIBC_2.29 copysignf64 F
+GLIBC_2.29 copysignl F
+GLIBC_2.29 cos F
+GLIBC_2.29 cosf F
+GLIBC_2.29 cosf32 F
+GLIBC_2.29 cosf32x F
+GLIBC_2.29 cosf64 F
+GLIBC_2.29 cosh F
+GLIBC_2.29 coshf F
+GLIBC_2.29 coshf32 F
+GLIBC_2.29 coshf32x F
+GLIBC_2.29 coshf64 F
+GLIBC_2.29 coshl F
+GLIBC_2.29 cosl F
+GLIBC_2.29 cpow F
+GLIBC_2.29 cpowf F
+GLIBC_2.29 cpowf32 F
+GLIBC_2.29 cpowf32x F
+GLIBC_2.29 cpowf64 F
+GLIBC_2.29 cpowl F
+GLIBC_2.29 cproj F
+GLIBC_2.29 cprojf F
+GLIBC_2.29 cprojf32 F
+GLIBC_2.29 cprojf32x F
+GLIBC_2.29 cprojf64 F
+GLIBC_2.29 cprojl F
+GLIBC_2.29 creal F
+GLIBC_2.29 crealf F
+GLIBC_2.29 crealf32 F
+GLIBC_2.29 crealf32x F
+GLIBC_2.29 crealf64 F
+GLIBC_2.29 creall F
+GLIBC_2.29 csin F
+GLIBC_2.29 csinf F
+GLIBC_2.29 csinf32 F
+GLIBC_2.29 csinf32x F
+GLIBC_2.29 csinf64 F
+GLIBC_2.29 csinh F
+GLIBC_2.29 csinhf F
+GLIBC_2.29 csinhf32 F
+GLIBC_2.29 csinhf32x F
+GLIBC_2.29 csinhf64 F
+GLIBC_2.29 csinhl F
+GLIBC_2.29 csinl F
+GLIBC_2.29 csqrt F
+GLIBC_2.29 csqrtf F
+GLIBC_2.29 csqrtf32 F
+GLIBC_2.29 csqrtf32x F
+GLIBC_2.29 csqrtf64 F
+GLIBC_2.29 csqrtl F
+GLIBC_2.29 ctan F
+GLIBC_2.29 ctanf F
+GLIBC_2.29 ctanf32 F
+GLIBC_2.29 ctanf32x F
+GLIBC_2.29 ctanf64 F
+GLIBC_2.29 ctanh F
+GLIBC_2.29 ctanhf F
+GLIBC_2.29 ctanhf32 F
+GLIBC_2.29 ctanhf32x F
+GLIBC_2.29 ctanhf64 F
+GLIBC_2.29 ctanhl F
+GLIBC_2.29 ctanl F
+GLIBC_2.29 daddl F
+GLIBC_2.29 ddivl F
+GLIBC_2.29 dmull F
+GLIBC_2.29 drem F
+GLIBC_2.29 dremf F
+GLIBC_2.29 dreml F
+GLIBC_2.29 dsubl F
+GLIBC_2.29 erf F
+GLIBC_2.29 erfc F
+GLIBC_2.29 erfcf F
+GLIBC_2.29 erfcf32 F
+GLIBC_2.29 erfcf32x F
+GLIBC_2.29 erfcf64 F
+GLIBC_2.29 erfcl F
+GLIBC_2.29 erff F
+GLIBC_2.29 erff32 F
+GLIBC_2.29 erff32x F
+GLIBC_2.29 erff64 F
+GLIBC_2.29 erfl F
+GLIBC_2.29 exp F
+GLIBC_2.29 exp10 F
+GLIBC_2.29 exp10f F
+GLIBC_2.29 exp10f32 F
+GLIBC_2.29 exp10f32x F
+GLIBC_2.29 exp10f64 F
+GLIBC_2.29 exp10l F
+GLIBC_2.29 exp2 F
+GLIBC_2.29 exp2f F
+GLIBC_2.29 exp2f32 F
+GLIBC_2.29 exp2f32x F
+GLIBC_2.29 exp2f64 F
+GLIBC_2.29 exp2l F
+GLIBC_2.29 expf F
+GLIBC_2.29 expf32 F
+GLIBC_2.29 expf32x F
+GLIBC_2.29 expf64 F
+GLIBC_2.29 expl F
+GLIBC_2.29 expm1 F
+GLIBC_2.29 expm1f F
+GLIBC_2.29 expm1f32 F
+GLIBC_2.29 expm1f32x F
+GLIBC_2.29 expm1f64 F
+GLIBC_2.29 expm1l F
+GLIBC_2.29 f32addf32x F
+GLIBC_2.29 f32addf64 F
+GLIBC_2.29 f32divf32x F
+GLIBC_2.29 f32divf64 F
+GLIBC_2.29 f32mulf32x F
+GLIBC_2.29 f32mulf64 F
+GLIBC_2.29 f32subf32x F
+GLIBC_2.29 f32subf64 F
+GLIBC_2.29 f32xaddf64 F
+GLIBC_2.29 f32xdivf64 F
+GLIBC_2.29 f32xmulf64 F
+GLIBC_2.29 f32xsubf64 F
+GLIBC_2.29 fabs F
+GLIBC_2.29 fabsf F
+GLIBC_2.29 fabsf32 F
+GLIBC_2.29 fabsf32x F
+GLIBC_2.29 fabsf64 F
+GLIBC_2.29 fabsl F
+GLIBC_2.29 fadd F
+GLIBC_2.29 faddl F
+GLIBC_2.29 fdim F
+GLIBC_2.29 fdimf F
+GLIBC_2.29 fdimf32 F
+GLIBC_2.29 fdimf32x F
+GLIBC_2.29 fdimf64 F
+GLIBC_2.29 fdiml F
+GLIBC_2.29 fdiv F
+GLIBC_2.29 fdivl F
+GLIBC_2.29 feclearexcept F
+GLIBC_2.29 fedisableexcept F
+GLIBC_2.29 feenableexcept F
+GLIBC_2.29 fegetenv F
+GLIBC_2.29 fegetexcept F
+GLIBC_2.29 fegetexceptflag F
+GLIBC_2.29 fegetmode F
+GLIBC_2.29 fegetround F
+GLIBC_2.29 feholdexcept F
+GLIBC_2.29 feraiseexcept F
+GLIBC_2.29 fesetenv F
+GLIBC_2.29 fesetexcept F
+GLIBC_2.29 fesetexceptflag F
+GLIBC_2.29 fesetmode F
+GLIBC_2.29 fesetround F
+GLIBC_2.29 fetestexcept F
+GLIBC_2.29 fetestexceptflag F
+GLIBC_2.29 feupdateenv F
+GLIBC_2.29 finite F
+GLIBC_2.29 finitef F
+GLIBC_2.29 finitel F
+GLIBC_2.29 floor F
+GLIBC_2.29 floorf F
+GLIBC_2.29 floorf32 F
+GLIBC_2.29 floorf32x F
+GLIBC_2.29 floorf64 F
+GLIBC_2.29 floorl F
+GLIBC_2.29 fma F
+GLIBC_2.29 fmaf F
+GLIBC_2.29 fmaf32 F
+GLIBC_2.29 fmaf32x F
+GLIBC_2.29 fmaf64 F
+GLIBC_2.29 fmal F
+GLIBC_2.29 fmax F
+GLIBC_2.29 fmaxf F
+GLIBC_2.29 fmaxf32 F
+GLIBC_2.29 fmaxf32x F
+GLIBC_2.29 fmaxf64 F
+GLIBC_2.29 fmaxl F
+GLIBC_2.29 fmaxmag F
+GLIBC_2.29 fmaxmagf F
+GLIBC_2.29 fmaxmagf32 F
+GLIBC_2.29 fmaxmagf32x F
+GLIBC_2.29 fmaxmagf64 F
+GLIBC_2.29 fmaxmagl F
+GLIBC_2.29 fmin F
+GLIBC_2.29 fminf F
+GLIBC_2.29 fminf32 F
+GLIBC_2.29 fminf32x F
+GLIBC_2.29 fminf64 F
+GLIBC_2.29 fminl F
+GLIBC_2.29 fminmag F
+GLIBC_2.29 fminmagf F
+GLIBC_2.29 fminmagf32 F
+GLIBC_2.29 fminmagf32x F
+GLIBC_2.29 fminmagf64 F
+GLIBC_2.29 fminmagl F
+GLIBC_2.29 fmod F
+GLIBC_2.29 fmodf F
+GLIBC_2.29 fmodf32 F
+GLIBC_2.29 fmodf32x F
+GLIBC_2.29 fmodf64 F
+GLIBC_2.29 fmodl F
+GLIBC_2.29 fmul F
+GLIBC_2.29 fmull F
+GLIBC_2.29 frexp F
+GLIBC_2.29 frexpf F
+GLIBC_2.29 frexpf32 F
+GLIBC_2.29 frexpf32x F
+GLIBC_2.29 frexpf64 F
+GLIBC_2.29 frexpl F
+GLIBC_2.29 fromfp F
+GLIBC_2.29 fromfpf F
+GLIBC_2.29 fromfpf32 F
+GLIBC_2.29 fromfpf32x F
+GLIBC_2.29 fromfpf64 F
+GLIBC_2.29 fromfpl F
+GLIBC_2.29 fromfpx F
+GLIBC_2.29 fromfpxf F
+GLIBC_2.29 fromfpxf32 F
+GLIBC_2.29 fromfpxf32x F
+GLIBC_2.29 fromfpxf64 F
+GLIBC_2.29 fromfpxl F
+GLIBC_2.29 fsub F
+GLIBC_2.29 fsubl F
+GLIBC_2.29 gamma F
+GLIBC_2.29 gammaf F
+GLIBC_2.29 gammal F
+GLIBC_2.29 getpayload F
+GLIBC_2.29 getpayloadf F
+GLIBC_2.29 getpayloadf32 F
+GLIBC_2.29 getpayloadf32x F
+GLIBC_2.29 getpayloadf64 F
+GLIBC_2.29 getpayloadl F
+GLIBC_2.29 hypot F
+GLIBC_2.29 hypotf F
+GLIBC_2.29 hypotf32 F
+GLIBC_2.29 hypotf32x F
+GLIBC_2.29 hypotf64 F
+GLIBC_2.29 hypotl F
+GLIBC_2.29 ilogb F
+GLIBC_2.29 ilogbf F
+GLIBC_2.29 ilogbf32 F
+GLIBC_2.29 ilogbf32x F
+GLIBC_2.29 ilogbf64 F
+GLIBC_2.29 ilogbl F
+GLIBC_2.29 j0 F
+GLIBC_2.29 j0f F
+GLIBC_2.29 j0f32 F
+GLIBC_2.29 j0f32x F
+GLIBC_2.29 j0f64 F
+GLIBC_2.29 j0l F
+GLIBC_2.29 j1 F
+GLIBC_2.29 j1f F
+GLIBC_2.29 j1f32 F
+GLIBC_2.29 j1f32x F
+GLIBC_2.29 j1f64 F
+GLIBC_2.29 j1l F
+GLIBC_2.29 jn F
+GLIBC_2.29 jnf F
+GLIBC_2.29 jnf32 F
+GLIBC_2.29 jnf32x F
+GLIBC_2.29 jnf64 F
+GLIBC_2.29 jnl F
+GLIBC_2.29 ldexp F
+GLIBC_2.29 ldexpf F
+GLIBC_2.29 ldexpf32 F
+GLIBC_2.29 ldexpf32x F
+GLIBC_2.29 ldexpf64 F
+GLIBC_2.29 ldexpl F
+GLIBC_2.29 lgamma F
+GLIBC_2.29 lgamma_r F
+GLIBC_2.29 lgammaf F
+GLIBC_2.29 lgammaf32 F
+GLIBC_2.29 lgammaf32_r F
+GLIBC_2.29 lgammaf32x F
+GLIBC_2.29 lgammaf32x_r F
+GLIBC_2.29 lgammaf64 F
+GLIBC_2.29 lgammaf64_r F
+GLIBC_2.29 lgammaf_r F
+GLIBC_2.29 lgammal F
+GLIBC_2.29 lgammal_r F
+GLIBC_2.29 llogb F
+GLIBC_2.29 llogbf F
+GLIBC_2.29 llogbf32 F
+GLIBC_2.29 llogbf32x F
+GLIBC_2.29 llogbf64 F
+GLIBC_2.29 llogbl F
+GLIBC_2.29 llrint F
+GLIBC_2.29 llrintf F
+GLIBC_2.29 llrintf32 F
+GLIBC_2.29 llrintf32x F
+GLIBC_2.29 llrintf64 F
+GLIBC_2.29 llrintl F
+GLIBC_2.29 llround F
+GLIBC_2.29 llroundf F
+GLIBC_2.29 llroundf32 F
+GLIBC_2.29 llroundf32x F
+GLIBC_2.29 llroundf64 F
+GLIBC_2.29 llroundl F
+GLIBC_2.29 log F
+GLIBC_2.29 log10 F
+GLIBC_2.29 log10f F
+GLIBC_2.29 log10f32 F
+GLIBC_2.29 log10f32x F
+GLIBC_2.29 log10f64 F
+GLIBC_2.29 log10l F
+GLIBC_2.29 log1p F
+GLIBC_2.29 log1pf F
+GLIBC_2.29 log1pf32 F
+GLIBC_2.29 log1pf32x F
+GLIBC_2.29 log1pf64 F
+GLIBC_2.29 log1pl F
+GLIBC_2.29 log2 F
+GLIBC_2.29 log2f F
+GLIBC_2.29 log2f32 F
+GLIBC_2.29 log2f32x F
+GLIBC_2.29 log2f64 F
+GLIBC_2.29 log2l F
+GLIBC_2.29 logb F
+GLIBC_2.29 logbf F
+GLIBC_2.29 logbf32 F
+GLIBC_2.29 logbf32x F
+GLIBC_2.29 logbf64 F
+GLIBC_2.29 logbl F
+GLIBC_2.29 logf F
+GLIBC_2.29 logf32 F
+GLIBC_2.29 logf32x F
+GLIBC_2.29 logf64 F
+GLIBC_2.29 logl F
+GLIBC_2.29 lrint F
+GLIBC_2.29 lrintf F
+GLIBC_2.29 lrintf32 F
+GLIBC_2.29 lrintf32x F
+GLIBC_2.29 lrintf64 F
+GLIBC_2.29 lrintl F
+GLIBC_2.29 lround F
+GLIBC_2.29 lroundf F
+GLIBC_2.29 lroundf32 F
+GLIBC_2.29 lroundf32x F
+GLIBC_2.29 lroundf64 F
+GLIBC_2.29 lroundl F
+GLIBC_2.29 modf F
+GLIBC_2.29 modff F
+GLIBC_2.29 modff32 F
+GLIBC_2.29 modff32x F
+GLIBC_2.29 modff64 F
+GLIBC_2.29 modfl F
+GLIBC_2.29 nan F
+GLIBC_2.29 nanf F
+GLIBC_2.29 nanf32 F
+GLIBC_2.29 nanf32x F
+GLIBC_2.29 nanf64 F
+GLIBC_2.29 nanl F
+GLIBC_2.29 nearbyint F
+GLIBC_2.29 nearbyintf F
+GLIBC_2.29 nearbyintf32 F
+GLIBC_2.29 nearbyintf32x F
+GLIBC_2.29 nearbyintf64 F
+GLIBC_2.29 nearbyintl F
+GLIBC_2.29 nextafter F
+GLIBC_2.29 nextafterf F
+GLIBC_2.29 nextafterf32 F
+GLIBC_2.29 nextafterf32x F
+GLIBC_2.29 nextafterf64 F
+GLIBC_2.29 nextafterl F
+GLIBC_2.29 nextdown F
+GLIBC_2.29 nextdownf F
+GLIBC_2.29 nextdownf32 F
+GLIBC_2.29 nextdownf32x F
+GLIBC_2.29 nextdownf64 F
+GLIBC_2.29 nextdownl F
+GLIBC_2.29 nexttoward F
+GLIBC_2.29 nexttowardf F
+GLIBC_2.29 nexttowardl F
+GLIBC_2.29 nextup F
+GLIBC_2.29 nextupf F
+GLIBC_2.29 nextupf32 F
+GLIBC_2.29 nextupf32x F
+GLIBC_2.29 nextupf64 F
+GLIBC_2.29 nextupl F
+GLIBC_2.29 pow F
+GLIBC_2.29 powf F
+GLIBC_2.29 powf32 F
+GLIBC_2.29 powf32x F
+GLIBC_2.29 powf64 F
+GLIBC_2.29 powl F
+GLIBC_2.29 remainder F
+GLIBC_2.29 remainderf F
+GLIBC_2.29 remainderf32 F
+GLIBC_2.29 remainderf32x F
+GLIBC_2.29 remainderf64 F
+GLIBC_2.29 remainderl F
+GLIBC_2.29 remquo F
+GLIBC_2.29 remquof F
+GLIBC_2.29 remquof32 F
+GLIBC_2.29 remquof32x F
+GLIBC_2.29 remquof64 F
+GLIBC_2.29 remquol F
+GLIBC_2.29 rint F
+GLIBC_2.29 rintf F
+GLIBC_2.29 rintf32 F
+GLIBC_2.29 rintf32x F
+GLIBC_2.29 rintf64 F
+GLIBC_2.29 rintl F
+GLIBC_2.29 round F
+GLIBC_2.29 roundeven F
+GLIBC_2.29 roundevenf F
+GLIBC_2.29 roundevenf32 F
+GLIBC_2.29 roundevenf32x F
+GLIBC_2.29 roundevenf64 F
+GLIBC_2.29 roundevenl F
+GLIBC_2.29 roundf F
+GLIBC_2.29 roundf32 F
+GLIBC_2.29 roundf32x F
+GLIBC_2.29 roundf64 F
+GLIBC_2.29 roundl F
+GLIBC_2.29 scalb F
+GLIBC_2.29 scalbf F
+GLIBC_2.29 scalbl F
+GLIBC_2.29 scalbln F
+GLIBC_2.29 scalblnf F
+GLIBC_2.29 scalblnf32 F
+GLIBC_2.29 scalblnf32x F
+GLIBC_2.29 scalblnf64 F
+GLIBC_2.29 scalblnl F
+GLIBC_2.29 scalbn F
+GLIBC_2.29 scalbnf F
+GLIBC_2.29 scalbnf32 F
+GLIBC_2.29 scalbnf32x F
+GLIBC_2.29 scalbnf64 F
+GLIBC_2.29 scalbnl F
+GLIBC_2.29 setpayload F
+GLIBC_2.29 setpayloadf F
+GLIBC_2.29 setpayloadf32 F
+GLIBC_2.29 setpayloadf32x F
+GLIBC_2.29 setpayloadf64 F
+GLIBC_2.29 setpayloadl F
+GLIBC_2.29 setpayloadsig F
+GLIBC_2.29 setpayloadsigf F
+GLIBC_2.29 setpayloadsigf32 F
+GLIBC_2.29 setpayloadsigf32x F
+GLIBC_2.29 setpayloadsigf64 F
+GLIBC_2.29 setpayloadsigl F
+GLIBC_2.29 signgam D 0x4
+GLIBC_2.29 significand F
+GLIBC_2.29 significandf F
+GLIBC_2.29 significandl F
+GLIBC_2.29 sin F
+GLIBC_2.29 sincos F
+GLIBC_2.29 sincosf F
+GLIBC_2.29 sincosf32 F
+GLIBC_2.29 sincosf32x F
+GLIBC_2.29 sincosf64 F
+GLIBC_2.29 sincosl F
+GLIBC_2.29 sinf F
+GLIBC_2.29 sinf32 F
+GLIBC_2.29 sinf32x F
+GLIBC_2.29 sinf64 F
+GLIBC_2.29 sinh F
+GLIBC_2.29 sinhf F
+GLIBC_2.29 sinhf32 F
+GLIBC_2.29 sinhf32x F
+GLIBC_2.29 sinhf64 F
+GLIBC_2.29 sinhl F
+GLIBC_2.29 sinl F
+GLIBC_2.29 sqrt F
+GLIBC_2.29 sqrtf F
+GLIBC_2.29 sqrtf32 F
+GLIBC_2.29 sqrtf32x F
+GLIBC_2.29 sqrtf64 F
+GLIBC_2.29 sqrtl F
+GLIBC_2.29 tan F
+GLIBC_2.29 tanf F
+GLIBC_2.29 tanf32 F
+GLIBC_2.29 tanf32x F
+GLIBC_2.29 tanf64 F
+GLIBC_2.29 tanh F
+GLIBC_2.29 tanhf F
+GLIBC_2.29 tanhf32 F
+GLIBC_2.29 tanhf32x F
+GLIBC_2.29 tanhf64 F
+GLIBC_2.29 tanhl F
+GLIBC_2.29 tanl F
+GLIBC_2.29 tgamma F
+GLIBC_2.29 tgammaf F
+GLIBC_2.29 tgammaf32 F
+GLIBC_2.29 tgammaf32x F
+GLIBC_2.29 tgammaf64 F
+GLIBC_2.29 tgammal F
+GLIBC_2.29 totalorder F
+GLIBC_2.29 totalorderf F
+GLIBC_2.29 totalorderf32 F
+GLIBC_2.29 totalorderf32x F
+GLIBC_2.29 totalorderf64 F
+GLIBC_2.29 totalorderl F
+GLIBC_2.29 totalordermag F
+GLIBC_2.29 totalordermagf F
+GLIBC_2.29 totalordermagf32 F
+GLIBC_2.29 totalordermagf32x F
+GLIBC_2.29 totalordermagf64 F
+GLIBC_2.29 totalordermagl F
+GLIBC_2.29 trunc F
+GLIBC_2.29 truncf F
+GLIBC_2.29 truncf32 F
+GLIBC_2.29 truncf32x F
+GLIBC_2.29 truncf64 F
+GLIBC_2.29 truncl F
+GLIBC_2.29 ufromfp F
+GLIBC_2.29 ufromfpf F
+GLIBC_2.29 ufromfpf32 F
+GLIBC_2.29 ufromfpf32x F
+GLIBC_2.29 ufromfpf64 F
+GLIBC_2.29 ufromfpl F
+GLIBC_2.29 ufromfpx F
+GLIBC_2.29 ufromfpxf F
+GLIBC_2.29 ufromfpxf32 F
+GLIBC_2.29 ufromfpxf32x F
+GLIBC_2.29 ufromfpxf64 F
+GLIBC_2.29 ufromfpxl F
+GLIBC_2.29 y0 F
+GLIBC_2.29 y0f F
+GLIBC_2.29 y0f32 F
+GLIBC_2.29 y0f32x F
+GLIBC_2.29 y0f64 F
+GLIBC_2.29 y0l F
+GLIBC_2.29 y1 F
+GLIBC_2.29 y1f F
+GLIBC_2.29 y1f32 F
+GLIBC_2.29 y1f32x F
+GLIBC_2.29 y1f64 F
+GLIBC_2.29 y1l F
+GLIBC_2.29 yn F
+GLIBC_2.29 ynf F
+GLIBC_2.29 ynf32 F
+GLIBC_2.29 ynf32x F
+GLIBC_2.29 ynf64 F
+GLIBC_2.29 ynl F
diff --git a/sysdeps/unix/sysv/linux/arc/libnsl.abilist b/sysdeps/unix/sysv/linux/arc/libnsl.abilist
new file mode 100644
index 000000000000..c8ef9e3891e3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libnsl.abilist
@@ -0,0 +1,120 @@
+GLIBC_2.29 __free_fdresult F
+GLIBC_2.29 __nis_default_access F
+GLIBC_2.29 __nis_default_group F
+GLIBC_2.29 __nis_default_owner F
+GLIBC_2.29 __nis_default_ttl F
+GLIBC_2.29 __nis_finddirectory F
+GLIBC_2.29 __nisbind_connect F
+GLIBC_2.29 __nisbind_create F
+GLIBC_2.29 __nisbind_destroy F
+GLIBC_2.29 __nisbind_next F
+GLIBC_2.29 __yp_check F
+GLIBC_2.29 nis_add F
+GLIBC_2.29 nis_add_entry F
+GLIBC_2.29 nis_addmember F
+GLIBC_2.29 nis_checkpoint F
+GLIBC_2.29 nis_clone_directory F
+GLIBC_2.29 nis_clone_object F
+GLIBC_2.29 nis_clone_result F
+GLIBC_2.29 nis_creategroup F
+GLIBC_2.29 nis_destroy_object F
+GLIBC_2.29 nis_destroygroup F
+GLIBC_2.29 nis_dir_cmp F
+GLIBC_2.29 nis_domain_of F
+GLIBC_2.29 nis_domain_of_r F
+GLIBC_2.29 nis_first_entry F
+GLIBC_2.29 nis_free_directory F
+GLIBC_2.29 nis_free_object F
+GLIBC_2.29 nis_free_request F
+GLIBC_2.29 nis_freenames F
+GLIBC_2.29 nis_freeresult F
+GLIBC_2.29 nis_freeservlist F
+GLIBC_2.29 nis_freetags F
+GLIBC_2.29 nis_getnames F
+GLIBC_2.29 nis_getservlist F
+GLIBC_2.29 nis_ismember F
+GLIBC_2.29 nis_leaf_of F
+GLIBC_2.29 nis_leaf_of_r F
+GLIBC_2.29 nis_lerror F
+GLIBC_2.29 nis_list F
+GLIBC_2.29 nis_local_directory F
+GLIBC_2.29 nis_local_group F
+GLIBC_2.29 nis_local_host F
+GLIBC_2.29 nis_local_principal F
+GLIBC_2.29 nis_lookup F
+GLIBC_2.29 nis_mkdir F
+GLIBC_2.29 nis_modify F
+GLIBC_2.29 nis_modify_entry F
+GLIBC_2.29 nis_name_of F
+GLIBC_2.29 nis_name_of_r F
+GLIBC_2.29 nis_next_entry F
+GLIBC_2.29 nis_perror F
+GLIBC_2.29 nis_ping F
+GLIBC_2.29 nis_print_directory F
+GLIBC_2.29 nis_print_entry F
+GLIBC_2.29 nis_print_group F
+GLIBC_2.29 nis_print_group_entry F
+GLIBC_2.29 nis_print_link F
+GLIBC_2.29 nis_print_object F
+GLIBC_2.29 nis_print_result F
+GLIBC_2.29 nis_print_rights F
+GLIBC_2.29 nis_print_table F
+GLIBC_2.29 nis_read_obj F
+GLIBC_2.29 nis_remove F
+GLIBC_2.29 nis_remove_entry F
+GLIBC_2.29 nis_removemember F
+GLIBC_2.29 nis_rmdir F
+GLIBC_2.29 nis_servstate F
+GLIBC_2.29 nis_sperrno F
+GLIBC_2.29 nis_sperror F
+GLIBC_2.29 nis_sperror_r F
+GLIBC_2.29 nis_stats F
+GLIBC_2.29 nis_verifygroup F
+GLIBC_2.29 nis_write_obj F
+GLIBC_2.29 readColdStartFile F
+GLIBC_2.29 writeColdStartFile F
+GLIBC_2.29 xdr_cback_data F
+GLIBC_2.29 xdr_domainname F
+GLIBC_2.29 xdr_keydat F
+GLIBC_2.29 xdr_mapname F
+GLIBC_2.29 xdr_obj_p F
+GLIBC_2.29 xdr_peername F
+GLIBC_2.29 xdr_valdat F
+GLIBC_2.29 xdr_yp_buf F
+GLIBC_2.29 xdr_ypall F
+GLIBC_2.29 xdr_ypbind_binding F
+GLIBC_2.29 xdr_ypbind_resp F
+GLIBC_2.29 xdr_ypbind_resptype F
+GLIBC_2.29 xdr_ypbind_setdom F
+GLIBC_2.29 xdr_ypdelete_args F
+GLIBC_2.29 xdr_ypmap_parms F
+GLIBC_2.29 xdr_ypmaplist F
+GLIBC_2.29 xdr_yppush_status F
+GLIBC_2.29 xdr_yppushresp_xfr F
+GLIBC_2.29 xdr_ypreq_key F
+GLIBC_2.29 xdr_ypreq_nokey F
+GLIBC_2.29 xdr_ypreq_xfr F
+GLIBC_2.29 xdr_ypresp_all F
+GLIBC_2.29 xdr_ypresp_key_val F
+GLIBC_2.29 xdr_ypresp_maplist F
+GLIBC_2.29 xdr_ypresp_master F
+GLIBC_2.29 xdr_ypresp_order F
+GLIBC_2.29 xdr_ypresp_val F
+GLIBC_2.29 xdr_ypresp_xfr F
+GLIBC_2.29 xdr_ypstat F
+GLIBC_2.29 xdr_ypupdate_args F
+GLIBC_2.29 xdr_ypxfrstat F
+GLIBC_2.29 yp_all F
+GLIBC_2.29 yp_bind F
+GLIBC_2.29 yp_first F
+GLIBC_2.29 yp_get_default_domain F
+GLIBC_2.29 yp_maplist F
+GLIBC_2.29 yp_master F
+GLIBC_2.29 yp_match F
+GLIBC_2.29 yp_next F
+GLIBC_2.29 yp_order F
+GLIBC_2.29 yp_unbind F
+GLIBC_2.29 yp_update F
+GLIBC_2.29 ypbinderr_string F
+GLIBC_2.29 yperr_string F
+GLIBC_2.29 ypprot_err F
diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
new file mode 100644
index 000000000000..ea4b79a518ee
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
@@ -0,0 +1,235 @@
+GLIBC_2.29 _IO_flockfile F
+GLIBC_2.29 _IO_ftrylockfile F
+GLIBC_2.29 _IO_funlockfile F
+GLIBC_2.29 __close F
+GLIBC_2.29 __connect F
+GLIBC_2.29 __errno_location F
+GLIBC_2.29 __h_errno_location F
+GLIBC_2.29 __libc_allocate_rtsig F
+GLIBC_2.29 __libc_current_sigrtmax F
+GLIBC_2.29 __libc_current_sigrtmin F
+GLIBC_2.29 __lseek F
+GLIBC_2.29 __nanosleep F
+GLIBC_2.29 __open F
+GLIBC_2.29 __open64 F
+GLIBC_2.29 __pread64 F
+GLIBC_2.29 __pthread_cleanup_routine F
+GLIBC_2.29 __pthread_getspecific F
+GLIBC_2.29 __pthread_key_create F
+GLIBC_2.29 __pthread_mutex_destroy F
+GLIBC_2.29 __pthread_mutex_init F
+GLIBC_2.29 __pthread_mutex_lock F
+GLIBC_2.29 __pthread_mutex_trylock F
+GLIBC_2.29 __pthread_mutex_unlock F
+GLIBC_2.29 __pthread_mutexattr_destroy F
+GLIBC_2.29 __pthread_mutexattr_init F
+GLIBC_2.29 __pthread_mutexattr_settype F
+GLIBC_2.29 __pthread_once F
+GLIBC_2.29 __pthread_register_cancel F
+GLIBC_2.29 __pthread_register_cancel_defer F
+GLIBC_2.29 __pthread_rwlock_destroy F
+GLIBC_2.29 __pthread_rwlock_init F
+GLIBC_2.29 __pthread_rwlock_rdlock F
+GLIBC_2.29 __pthread_rwlock_tryrdlock F
+GLIBC_2.29 __pthread_rwlock_trywrlock F
+GLIBC_2.29 __pthread_rwlock_unlock F
+GLIBC_2.29 __pthread_rwlock_wrlock F
+GLIBC_2.29 __pthread_setspecific F
+GLIBC_2.29 __pthread_unregister_cancel F
+GLIBC_2.29 __pthread_unregister_cancel_restore F
+GLIBC_2.29 __pthread_unwind_next F
+GLIBC_2.29 __pwrite64 F
+GLIBC_2.29 __read F
+GLIBC_2.29 __res_state F
+GLIBC_2.29 __send F
+GLIBC_2.29 __sigaction F
+GLIBC_2.29 __wait F
+GLIBC_2.29 __write F
+GLIBC_2.29 _pthread_cleanup_pop F
+GLIBC_2.29 _pthread_cleanup_pop_restore F
+GLIBC_2.29 _pthread_cleanup_push F
+GLIBC_2.29 _pthread_cleanup_push_defer F
+GLIBC_2.29 accept F
+GLIBC_2.29 call_once F
+GLIBC_2.29 close F
+GLIBC_2.29 cnd_broadcast F
+GLIBC_2.29 cnd_destroy F
+GLIBC_2.29 cnd_init F
+GLIBC_2.29 cnd_signal F
+GLIBC_2.29 cnd_timedwait F
+GLIBC_2.29 cnd_wait F
+GLIBC_2.29 connect F
+GLIBC_2.29 flockfile F
+GLIBC_2.29 fsync F
+GLIBC_2.29 ftrylockfile F
+GLIBC_2.29 funlockfile F
+GLIBC_2.29 lseek F
+GLIBC_2.29 lseek64 F
+GLIBC_2.29 msync F
+GLIBC_2.29 mtx_destroy F
+GLIBC_2.29 mtx_init F
+GLIBC_2.29 mtx_lock F
+GLIBC_2.29 mtx_timedlock F
+GLIBC_2.29 mtx_trylock F
+GLIBC_2.29 mtx_unlock F
+GLIBC_2.29 nanosleep F
+GLIBC_2.29 open F
+GLIBC_2.29 open64 F
+GLIBC_2.29 pause F
+GLIBC_2.29 pread F
+GLIBC_2.29 pread64 F
+GLIBC_2.29 pthread_attr_destroy F
+GLIBC_2.29 pthread_attr_getaffinity_np F
+GLIBC_2.29 pthread_attr_getdetachstate F
+GLIBC_2.29 pthread_attr_getguardsize F
+GLIBC_2.29 pthread_attr_getinheritsched F
+GLIBC_2.29 pthread_attr_getschedparam F
+GLIBC_2.29 pthread_attr_getschedpolicy F
+GLIBC_2.29 pthread_attr_getscope F
+GLIBC_2.29 pthread_attr_getstack F
+GLIBC_2.29 pthread_attr_getstackaddr F
+GLIBC_2.29 pthread_attr_getstacksize F
+GLIBC_2.29 pthread_attr_init F
+GLIBC_2.29 pthread_attr_setaffinity_np F
+GLIBC_2.29 pthread_attr_setdetachstate F
+GLIBC_2.29 pthread_attr_setguardsize F
+GLIBC_2.29 pthread_attr_setinheritsched F
+GLIBC_2.29 pthread_attr_setschedparam F
+GLIBC_2.29 pthread_attr_setschedpolicy F
+GLIBC_2.29 pthread_attr_setscope F
+GLIBC_2.29 pthread_attr_setstack F
+GLIBC_2.29 pthread_attr_setstackaddr F
+GLIBC_2.29 pthread_attr_setstacksize F
+GLIBC_2.29 pthread_barrier_destroy F
+GLIBC_2.29 pthread_barrier_init F
+GLIBC_2.29 pthread_barrier_wait F
+GLIBC_2.29 pthread_barrierattr_destroy F
+GLIBC_2.29 pthread_barrierattr_getpshared F
+GLIBC_2.29 pthread_barrierattr_init F
+GLIBC_2.29 pthread_barrierattr_setpshared F
+GLIBC_2.29 pthread_cancel F
+GLIBC_2.29 pthread_cond_broadcast F
+GLIBC_2.29 pthread_cond_destroy F
+GLIBC_2.29 pthread_cond_init F
+GLIBC_2.29 pthread_cond_signal F
+GLIBC_2.29 pthread_cond_timedwait F
+GLIBC_2.29 pthread_cond_wait F
+GLIBC_2.29 pthread_condattr_destroy F
+GLIBC_2.29 pthread_condattr_getclock F
+GLIBC_2.29 pthread_condattr_getpshared F
+GLIBC_2.29 pthread_condattr_init F
+GLIBC_2.29 pthread_condattr_setclock F
+GLIBC_2.29 pthread_condattr_setpshared F
+GLIBC_2.29 pthread_create F
+GLIBC_2.29 pthread_detach F
+GLIBC_2.29 pthread_equal F
+GLIBC_2.29 pthread_exit F
+GLIBC_2.29 pthread_getaffinity_np F
+GLIBC_2.29 pthread_getattr_default_np F
+GLIBC_2.29 pthread_getattr_np F
+GLIBC_2.29 pthread_getconcurrency F
+GLIBC_2.29 pthread_getcpuclockid F
+GLIBC_2.29 pthread_getname_np F
+GLIBC_2.29 pthread_getschedparam F
+GLIBC_2.29 pthread_getspecific F
+GLIBC_2.29 pthread_join F
+GLIBC_2.29 pthread_key_create F
+GLIBC_2.29 pthread_key_delete F
+GLIBC_2.29 pthread_kill F
+GLIBC_2.29 pthread_kill_other_threads_np F
+GLIBC_2.29 pthread_mutex_consistent F
+GLIBC_2.29 pthread_mutex_consistent_np F
+GLIBC_2.29 pthread_mutex_destroy F
+GLIBC_2.29 pthread_mutex_getprioceiling F
+GLIBC_2.29 pthread_mutex_init F
+GLIBC_2.29 pthread_mutex_lock F
+GLIBC_2.29 pthread_mutex_setprioceiling F
+GLIBC_2.29 pthread_mutex_timedlock F
+GLIBC_2.29 pthread_mutex_trylock F
+GLIBC_2.29 pthread_mutex_unlock F
+GLIBC_2.29 pthread_mutexattr_destroy F
+GLIBC_2.29 pthread_mutexattr_getkind_np F
+GLIBC_2.29 pthread_mutexattr_getprioceiling F
+GLIBC_2.29 pthread_mutexattr_getprotocol F
+GLIBC_2.29 pthread_mutexattr_getpshared F
+GLIBC_2.29 pthread_mutexattr_getrobust F
+GLIBC_2.29 pthread_mutexattr_getrobust_np F
+GLIBC_2.29 pthread_mutexattr_gettype F
+GLIBC_2.29 pthread_mutexattr_init F
+GLIBC_2.29 pthread_mutexattr_setkind_np F
+GLIBC_2.29 pthread_mutexattr_setprioceiling F
+GLIBC_2.29 pthread_mutexattr_setprotocol F
+GLIBC_2.29 pthread_mutexattr_setpshared F
+GLIBC_2.29 pthread_mutexattr_setrobust F
+GLIBC_2.29 pthread_mutexattr_setrobust_np F
+GLIBC_2.29 pthread_mutexattr_settype F
+GLIBC_2.29 pthread_once F
+GLIBC_2.29 pthread_rwlock_destroy F
+GLIBC_2.29 pthread_rwlock_init F
+GLIBC_2.29 pthread_rwlock_rdlock F
+GLIBC_2.29 pthread_rwlock_timedrdlock F
+GLIBC_2.29 pthread_rwlock_timedwrlock F
+GLIBC_2.29 pthread_rwlock_tryrdlock F
+GLIBC_2.29 pthread_rwlock_trywrlock F
+GLIBC_2.29 pthread_rwlock_unlock F
+GLIBC_2.29 pthread_rwlock_wrlock F
+GLIBC_2.29 pthread_rwlockattr_destroy F
+GLIBC_2.29 pthread_rwlockattr_getkind_np F
+GLIBC_2.29 pthread_rwlockattr_getpshared F
+GLIBC_2.29 pthread_rwlockattr_init F
+GLIBC_2.29 pthread_rwlockattr_setkind_np F
+GLIBC_2.29 pthread_rwlockattr_setpshared F
+GLIBC_2.29 pthread_setaffinity_np F
+GLIBC_2.29 pthread_setattr_default_np F
+GLIBC_2.29 pthread_setcancelstate F
+GLIBC_2.29 pthread_setcanceltype F
+GLIBC_2.29 pthread_setconcurrency F
+GLIBC_2.29 pthread_setname_np F
+GLIBC_2.29 pthread_setschedparam F
+GLIBC_2.29 pthread_setschedprio F
+GLIBC_2.29 pthread_setspecific F
+GLIBC_2.29 pthread_sigmask F
+GLIBC_2.29 pthread_sigqueue F
+GLIBC_2.29 pthread_spin_destroy F
+GLIBC_2.29 pthread_spin_init F
+GLIBC_2.29 pthread_spin_lock F
+GLIBC_2.29 pthread_spin_trylock F
+GLIBC_2.29 pthread_spin_unlock F
+GLIBC_2.29 pthread_testcancel F
+GLIBC_2.29 pthread_timedjoin_np F
+GLIBC_2.29 pthread_tryjoin_np F
+GLIBC_2.29 pthread_yield F
+GLIBC_2.29 pwrite F
+GLIBC_2.29 pwrite64 F
+GLIBC_2.29 raise F
+GLIBC_2.29 read F
+GLIBC_2.29 recv F
+GLIBC_2.29 recvfrom F
+GLIBC_2.29 recvmsg F
+GLIBC_2.29 sem_close F
+GLIBC_2.29 sem_destroy F
+GLIBC_2.29 sem_getvalue F
+GLIBC_2.29 sem_init F
+GLIBC_2.29 sem_open F
+GLIBC_2.29 sem_post F
+GLIBC_2.29 sem_timedwait F
+GLIBC_2.29 sem_trywait F
+GLIBC_2.29 sem_unlink F
+GLIBC_2.29 sem_wait F
+GLIBC_2.29 send F
+GLIBC_2.29 sendmsg F
+GLIBC_2.29 sendto F
+GLIBC_2.29 sigaction F
+GLIBC_2.29 sigwait F
+GLIBC_2.29 tcdrain F
+GLIBC_2.29 thrd_create F
+GLIBC_2.29 thrd_detach F
+GLIBC_2.29 thrd_exit F
+GLIBC_2.29 thrd_join F
+GLIBC_2.29 tss_create F
+GLIBC_2.29 tss_delete F
+GLIBC_2.29 tss_get F
+GLIBC_2.29 tss_set F
+GLIBC_2.29 wait F
+GLIBC_2.29 waitpid F
+GLIBC_2.29 write F
diff --git a/sysdeps/unix/sysv/linux/arc/libresolv.abilist b/sysdeps/unix/sysv/linux/arc/libresolv.abilist
new file mode 100644
index 000000000000..2830a7efd17d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libresolv.abilist
@@ -0,0 +1,79 @@
+GLIBC_2.29 __b64_ntop F
+GLIBC_2.29 __b64_pton F
+GLIBC_2.29 __dn_comp F
+GLIBC_2.29 __dn_count_labels F
+GLIBC_2.29 __dn_expand F
+GLIBC_2.29 __dn_skipname F
+GLIBC_2.29 __fp_nquery F
+GLIBC_2.29 __fp_query F
+GLIBC_2.29 __fp_resstat F
+GLIBC_2.29 __hostalias F
+GLIBC_2.29 __loc_aton F
+GLIBC_2.29 __loc_ntoa F
+GLIBC_2.29 __p_cdname F
+GLIBC_2.29 __p_cdnname F
+GLIBC_2.29 __p_class F
+GLIBC_2.29 __p_class_syms D 0x54
+GLIBC_2.29 __p_fqname F
+GLIBC_2.29 __p_fqnname F
+GLIBC_2.29 __p_option F
+GLIBC_2.29 __p_query F
+GLIBC_2.29 __p_rcode F
+GLIBC_2.29 __p_time F
+GLIBC_2.29 __p_type F
+GLIBC_2.29 __p_type_syms D 0x228
+GLIBC_2.29 __putlong F
+GLIBC_2.29 __putshort F
+GLIBC_2.29 __res_close F
+GLIBC_2.29 __res_dnok F
+GLIBC_2.29 __res_hnok F
+GLIBC_2.29 __res_hostalias F
+GLIBC_2.29 __res_isourserver F
+GLIBC_2.29 __res_mailok F
+GLIBC_2.29 __res_mkquery F
+GLIBC_2.29 __res_nameinquery F
+GLIBC_2.29 __res_nmkquery F
+GLIBC_2.29 __res_nquery F
+GLIBC_2.29 __res_nquerydomain F
+GLIBC_2.29 __res_nsearch F
+GLIBC_2.29 __res_nsend F
+GLIBC_2.29 __res_ownok F
+GLIBC_2.29 __res_queriesmatch F
+GLIBC_2.29 __res_query F
+GLIBC_2.29 __res_querydomain F
+GLIBC_2.29 __res_search F
+GLIBC_2.29 __res_send F
+GLIBC_2.29 __sym_ntop F
+GLIBC_2.29 __sym_ntos F
+GLIBC_2.29 __sym_ston F
+GLIBC_2.29 _getlong F
+GLIBC_2.29 _getshort F
+GLIBC_2.29 inet_net_ntop F
+GLIBC_2.29 inet_net_pton F
+GLIBC_2.29 inet_neta F
+GLIBC_2.29 ns_datetosecs F
+GLIBC_2.29 ns_format_ttl F
+GLIBC_2.29 ns_get16 F
+GLIBC_2.29 ns_get32 F
+GLIBC_2.29 ns_initparse F
+GLIBC_2.29 ns_makecanon F
+GLIBC_2.29 ns_msg_getflag F
+GLIBC_2.29 ns_name_compress F
+GLIBC_2.29 ns_name_ntol F
+GLIBC_2.29 ns_name_ntop F
+GLIBC_2.29 ns_name_pack F
+GLIBC_2.29 ns_name_pton F
+GLIBC_2.29 ns_name_rollback F
+GLIBC_2.29 ns_name_skip F
+GLIBC_2.29 ns_name_uncompress F
+GLIBC_2.29 ns_name_unpack F
+GLIBC_2.29 ns_parse_ttl F
+GLIBC_2.29 ns_parserr F
+GLIBC_2.29 ns_put16 F
+GLIBC_2.29 ns_put32 F
+GLIBC_2.29 ns_samedomain F
+GLIBC_2.29 ns_samename F
+GLIBC_2.29 ns_skiprr F
+GLIBC_2.29 ns_sprintrr F
+GLIBC_2.29 ns_sprintrrf F
+GLIBC_2.29 ns_subdomain F
diff --git a/sysdeps/unix/sysv/linux/arc/librt.abilist b/sysdeps/unix/sysv/linux/arc/librt.abilist
new file mode 100644
index 000000000000..c6690ef7c135
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/librt.abilist
@@ -0,0 +1,35 @@
+GLIBC_2.29 __mq_open_2 F
+GLIBC_2.29 aio_cancel F
+GLIBC_2.29 aio_cancel64 F
+GLIBC_2.29 aio_error F
+GLIBC_2.29 aio_error64 F
+GLIBC_2.29 aio_fsync F
+GLIBC_2.29 aio_fsync64 F
+GLIBC_2.29 aio_init F
+GLIBC_2.29 aio_read F
+GLIBC_2.29 aio_read64 F
+GLIBC_2.29 aio_return F
+GLIBC_2.29 aio_return64 F
+GLIBC_2.29 aio_suspend F
+GLIBC_2.29 aio_suspend64 F
+GLIBC_2.29 aio_write F
+GLIBC_2.29 aio_write64 F
+GLIBC_2.29 lio_listio F
+GLIBC_2.29 lio_listio64 F
+GLIBC_2.29 mq_close F
+GLIBC_2.29 mq_getattr F
+GLIBC_2.29 mq_notify F
+GLIBC_2.29 mq_open F
+GLIBC_2.29 mq_receive F
+GLIBC_2.29 mq_send F
+GLIBC_2.29 mq_setattr F
+GLIBC_2.29 mq_timedreceive F
+GLIBC_2.29 mq_timedsend F
+GLIBC_2.29 mq_unlink F
+GLIBC_2.29 shm_open F
+GLIBC_2.29 shm_unlink F
+GLIBC_2.29 timer_create F
+GLIBC_2.29 timer_delete F
+GLIBC_2.29 timer_getoverrun F
+GLIBC_2.29 timer_gettime F
+GLIBC_2.29 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/arc/libthread_db.abilist b/sysdeps/unix/sysv/linux/arc/libthread_db.abilist
new file mode 100644
index 000000000000..37e9bace5521
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libthread_db.abilist
@@ -0,0 +1,40 @@
+GLIBC_2.29 td_init F
+GLIBC_2.29 td_log F
+GLIBC_2.29 td_symbol_list F
+GLIBC_2.29 td_ta_clear_event F
+GLIBC_2.29 td_ta_delete F
+GLIBC_2.29 td_ta_enable_stats F
+GLIBC_2.29 td_ta_event_addr F
+GLIBC_2.29 td_ta_event_getmsg F
+GLIBC_2.29 td_ta_get_nthreads F
+GLIBC_2.29 td_ta_get_ph F
+GLIBC_2.29 td_ta_get_stats F
+GLIBC_2.29 td_ta_map_id2thr F
+GLIBC_2.29 td_ta_map_lwp2thr F
+GLIBC_2.29 td_ta_new F
+GLIBC_2.29 td_ta_reset_stats F
+GLIBC_2.29 td_ta_set_event F
+GLIBC_2.29 td_ta_setconcurrency F
+GLIBC_2.29 td_ta_thr_iter F
+GLIBC_2.29 td_ta_tsd_iter F
+GLIBC_2.29 td_thr_clear_event F
+GLIBC_2.29 td_thr_dbresume F
+GLIBC_2.29 td_thr_dbsuspend F
+GLIBC_2.29 td_thr_event_enable F
+GLIBC_2.29 td_thr_event_getmsg F
+GLIBC_2.29 td_thr_get_info F
+GLIBC_2.29 td_thr_getfpregs F
+GLIBC_2.29 td_thr_getgregs F
+GLIBC_2.29 td_thr_getxregs F
+GLIBC_2.29 td_thr_getxregsize F
+GLIBC_2.29 td_thr_set_event F
+GLIBC_2.29 td_thr_setfpregs F
+GLIBC_2.29 td_thr_setgregs F
+GLIBC_2.29 td_thr_setprio F
+GLIBC_2.29 td_thr_setsigpending F
+GLIBC_2.29 td_thr_setxregs F
+GLIBC_2.29 td_thr_sigsetmask F
+GLIBC_2.29 td_thr_tls_get_addr F
+GLIBC_2.29 td_thr_tlsbase F
+GLIBC_2.29 td_thr_tsd F
+GLIBC_2.29 td_thr_validate F
diff --git a/sysdeps/unix/sysv/linux/arc/libutil.abilist b/sysdeps/unix/sysv/linux/arc/libutil.abilist
new file mode 100644
index 000000000000..cbd11999a4f1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/libutil.abilist
@@ -0,0 +1,6 @@
+GLIBC_2.29 forkpty F
+GLIBC_2.29 login F
+GLIBC_2.29 login_tty F
+GLIBC_2.29 logout F
+GLIBC_2.29 logwtmp F
+GLIBC_2.29 openpty F
diff --git a/sysdeps/unix/sysv/linux/arc/localplt.data b/sysdeps/unix/sysv/linux/arc/localplt.data
new file mode 100644
index 000000000000..3a9bfb648ac9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/localplt.data
@@ -0,0 +1,15 @@
+libc.so: realloc
+libc.so: malloc
+libc.so: memalign
+libc.so: calloc
+libc.so: free
+# libc.so: memcpy
+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
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 07/21] ARC: math soft float support
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (16 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 09/21] ARC: Linux ABI Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 23:24 ` Joseph Myers
2018-12-18 21:15 ` [PATCH 08/21] ARC: Linux Syscall Interface Vineet Gupta
` (5 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 6 +++
sysdeps/arc/bits/fenv.h | 92 ++++++++++++++++++++++++++++++++
sysdeps/arc/math_private.h | 6 +++
sysdeps/arc/nofpu/Implies | 1 +
sysdeps/arc/nofpu/math-tests-exception.h | 27 ++++++++++
sysdeps/arc/nofpu/math-tests-rounding.h | 27 ++++++++++
sysdeps/arc/sfp-machine.h | 51 ++++++++++++++++++
7 files changed, 210 insertions(+)
create mode 100644 sysdeps/arc/bits/fenv.h
create mode 100644 sysdeps/arc/math_private.h
create mode 100644 sysdeps/arc/nofpu/Implies
create mode 100644 sysdeps/arc/nofpu/math-tests-exception.h
create mode 100644 sysdeps/arc/nofpu/math-tests-rounding.h
create mode 100644 sysdeps/arc/sfp-machine.h
diff --git a/ChangeLog b/ChangeLog
index d2f6cd2d0d09..b946f57204b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,12 @@
* sysdeps/arc/atomic-machine.h: New file.
* sysdeps/arc/nptl/bits/pthreadtypes-arch.h: New file.
* sysdeps/arc/nptl/bits/semaphore.h: New file.
+ * sysdeps/arc/bits/fenv.h: New file.
+ * sysdeps/arc/math_private.h: New file.
+ * sysdeps/arc/nofpu/Implies: New file.
+ * sysdeps/arc/nofpu/math-tests-exception.h: New file.
+ * sysdeps/arc/nofpu/math-tests-rounding.h: New file.
+ * sysdeps/arc/sfp-machine.h: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/bits/fenv.h b/sysdeps/arc/bits/fenv.h
new file mode 100644
index 000000000000..4053f57d1094
--- /dev/null
+++ b/sysdeps/arc/bits/fenv.h
@@ -0,0 +1,92 @@
+/* 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
+ 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/>. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__)
+
+enum
+ {
+ FE_INVALID =
+#define FE_INVALID (0x01)
+ FE_INVALID,
+ FE_DIVBYZERO =
+#define FE_DIVBYZERO (0x02)
+ FE_DIVBYZERO,
+ FE_OVERFLOW =
+#define FE_OVERFLOW (0x04)
+ FE_OVERFLOW,
+ FE_UNDERFLOW =
+#define FE_UNDERFLOW (0x08)
+ FE_UNDERFLOW,
+ FE_INEXACT =
+#define FE_INEXACT (0x10)
+ FE_INEXACT
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+enum
+ {
+ FE_TOWARDZERO =
+#define FE_TOWARDZERO (0x0)
+ FE_TOWARDZERO,
+ FE_TONEAREST =
+#define FE_TONEAREST (0x1)
+ FE_TONEAREST,
+ FE_UPWARD =
+#define FE_UPWARD (0x2)
+ FE_UPWARD,
+ FE_DOWNWARD =
+#define FE_DOWNWARD (0x3)
+ FE_DOWNWARD
+ };
+
+#else
+
+/* In the soft-float case, only rounding to nearest is supported, with
+ no exceptions. */
+
+enum
+ {
+ __FE_UNDEFINED = -1,
+
+ FE_TONEAREST =
+# define FE_TONEAREST 0x0
+ FE_TONEAREST
+ };
+
+# define FE_ALL_EXCEPT 0
+
+#endif
+
+typedef unsigned int fexcept_t;
+typedef unsigned int fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((const fenv_t *) -1)
+
+#if __GLIBC_USE (IEC_60559_BFP_EXT)
+/* Type representing floating-point control modes. */
+typedef unsigned int femode_t;
+
+/* Default floating-point control modes. */
+# define FE_DFL_MODE ((const femode_t *) -1L)
+#endif
diff --git a/sysdeps/arc/math_private.h b/sysdeps/arc/math_private.h
new file mode 100644
index 000000000000..35046d842533
--- /dev/null
+++ b/sysdeps/arc/math_private.h
@@ -0,0 +1,6 @@
+#ifndef ARC_MATH_PRIVATE_H
+#define ARC_MATH_PRIVATE_H
+
+#include_next <math_private.h>
+
+#endif
diff --git a/sysdeps/arc/nofpu/Implies b/sysdeps/arc/nofpu/Implies
new file mode 100644
index 000000000000..abcbadb25f22
--- /dev/null
+++ b/sysdeps/arc/nofpu/Implies
@@ -0,0 +1 @@
+ieee754/soft-fp
diff --git a/sysdeps/arc/nofpu/math-tests-exception.h b/sysdeps/arc/nofpu/math-tests-exception.h
new file mode 100644
index 000000000000..bb338388d8af
--- /dev/null
+++ b/sysdeps/arc/nofpu/math-tests-exception.h
@@ -0,0 +1,27 @@
+/* Configuration for math tests. exceptions support ARC 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
+ 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/>. */
+
+#ifndef ARC_NOFPU_MATH_TESTS_EXCEPTIONS_H
+#define ARC_NOFPU_MATH_TESTS_EXCEPTIONS_H 1
+
+/* soft-float doesnot support exceptions */
+#define EXCEPTION_TESTS_float 0
+#define EXCEPTION_TESTS_double 0
+#define EXCEPTION_TESTS_long_double 0
+
+#endif
diff --git a/sysdeps/arc/nofpu/math-tests-rounding.h b/sysdeps/arc/nofpu/math-tests-rounding.h
new file mode 100644
index 000000000000..e371e647db13
--- /dev/null
+++ b/sysdeps/arc/nofpu/math-tests-rounding.h
@@ -0,0 +1,27 @@
+/* Configuration for math tests: rounding mode support. ARC 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
+ 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/>. */
+
+#ifndef ARC_NOFPU_MATH_TESTS_ROUNDING_H
+#define ARC_NOFPU_MATH_TESTS_ROUNDING_H 1
+
+/* soft-float only supports to-nearest rounding mode */
+#define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
+#define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
+#define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST)
+
+#endif
diff --git a/sysdeps/arc/sfp-machine.h b/sysdeps/arc/sfp-machine.h
new file mode 100644
index 000000000000..95eefc187430
--- /dev/null
+++ b/sysdeps/arc/sfp-machine.h
@@ -0,0 +1,51 @@
+#define _FP_W_TYPE_SIZE 32
+#define _FP_W_TYPE unsigned long
+#define _FP_WS_TYPE signed long
+#define _FP_I_TYPE long
+
+#define _FP_MUL_MEAT_S(R,X,Y) \
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_D(R,X,Y) \
+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_Q(R,X,Y) \
+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_MUL_MEAT_DW_S(R,X,Y) \
+ _FP_MUL_MEAT_DW_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_DW_D(R,X,Y) \
+ _FP_MUL_MEAT_DW_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_DW_Q(R,X,Y) \
+ _FP_MUL_MEAT_DW_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
+#define _FP_NANSIGN_S 0
+#define _FP_NANSIGN_D 0
+#define _FP_NANSIGN_Q 0
+
+#define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
+
+/* This is arbitrarily taken from the PowerPC version. */
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
+ { \
+ R##_s = Y##_s; \
+ _FP_FRAC_COPY_##wc(R,Y); \
+ } \
+ else \
+ { \
+ R##_s = X##_s; \
+ _FP_FRAC_COPY_##wc(R,X); \
+ } \
+ R##_c = FP_CLS_NAN; \
+ } while (0)
+
+#define _FP_TININESS_AFTER_ROUNDING 0
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 13/21] ARC: Build Infrastructure
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (10 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 19/21] ARC: fix several unwining and cancelation tests Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 23:46 ` Joseph Myers
2018-12-18 21:05 ` [PATCH 21/21] NEWS: mention ARC port Vineet Gupta
` (11 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 13 +++++++++++++
sysdeps/arc/Implies | 3 +++
sysdeps/arc/Makefile | 25 +++++++++++++++++++++++++
sysdeps/arc/Versions | 14 ++++++++++++++
sysdeps/arc/configure | 17 +++++++++++++++++
sysdeps/arc/configure.ac | 13 +++++++++++++
sysdeps/arc/nptl/Makefile | 22 ++++++++++++++++++++++
sysdeps/arc/preconfigure | 14 ++++++++++++++
sysdeps/unix/sysv/linux/arc/Implies | 3 +++
sysdeps/unix/sysv/linux/arc/Makefile | 16 ++++++++++++++++
sysdeps/unix/sysv/linux/arc/Versions | 12 ++++++++++++
sysdeps/unix/sysv/linux/arc/configure | 4 ++++
sysdeps/unix/sysv/linux/arc/configure.ac | 4 ++++
sysdeps/unix/sysv/linux/arc/shlib-versions | 2 ++
14 files changed, 162 insertions(+)
create mode 100644 sysdeps/arc/Implies
create mode 100644 sysdeps/arc/Makefile
create mode 100644 sysdeps/arc/Versions
create mode 100644 sysdeps/arc/configure
create mode 100644 sysdeps/arc/configure.ac
create mode 100644 sysdeps/arc/nptl/Makefile
create mode 100644 sysdeps/arc/preconfigure
create mode 100644 sysdeps/unix/sysv/linux/arc/Implies
create mode 100644 sysdeps/unix/sysv/linux/arc/Makefile
create mode 100644 sysdeps/unix/sysv/linux/arc/Versions
create mode 100644 sysdeps/unix/sysv/linux/arc/configure
create mode 100644 sysdeps/unix/sysv/linux/arc/configure.ac
create mode 100644 sysdeps/unix/sysv/linux/arc/shlib-versions
diff --git a/ChangeLog b/ChangeLog
index 3735df67a3b2..6628960c487e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -92,6 +92,19 @@
* sysdeps/unix/sysv/linux/arc/libutil.abilist: New file.
* sysdeps/unix/sysv/linux/arc/localplt.data: New file.
* sysdeps/unix/sysv/linux/syscall-names.list: Update for ARC.
+ * sysdeps/arc/Implies: New file.
+ * sysdeps/arc/Makefile: New file.
+ * sysdeps/arc/Versions: New file.
+ * sysdeps/arc/configure: New file.
+ * sysdeps/arc/configure.ac: New file.
+ * sysdeps/arc/nptl/Makefile: New file.
+ * sysdeps/arc/preconfigure: New file.
+ * sysdeps/unix/sysv/linux/arc/Implies: New file.
+ * sysdeps/unix/sysv/linux/arc/Makefile: New file.
+ * sysdeps/unix/sysv/linux/arc/Versions: New file.
+ * sysdeps/unix/sysv/linux/arc/configure: New file.
+ * sysdeps/unix/sysv/linux/arc/configure.ac: New file.
+ * sysdeps/unix/sysv/linux/arc/shlib-versions: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/Implies b/sysdeps/arc/Implies
new file mode 100644
index 000000000000..387a0ca05204
--- /dev/null
+++ b/sysdeps/arc/Implies
@@ -0,0 +1,3 @@
+wordsize-32
+ieee754/dbl-64
+ieee754/flt-32
diff --git a/sysdeps/arc/Makefile b/sysdeps/arc/Makefile
new file mode 100644
index 000000000000..a88eda115b95
--- /dev/null
+++ b/sysdeps/arc/Makefile
@@ -0,0 +1,25 @@
+# ARC Makefile
+# Copyright (C) 1993-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
+# 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/>.
+
+# We don't support long doubles as a distinct type. We don't need to set
+# this variable; it's here mostly for documentational purposes.
+long-double-fcts = no
+
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+endif
diff --git a/sysdeps/arc/Versions b/sysdeps/arc/Versions
new file mode 100644
index 000000000000..c088bb27a0e5
--- /dev/null
+++ b/sysdeps/arc/Versions
@@ -0,0 +1,14 @@
+libc {
+ GLIBC_2.29 {
+ __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2;
+ __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi;
+ __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi;
+ __floatdidf; __floatdisf; __floatsidf; __floatsisf;
+ __floatundidf; __floatundisf; __floatunsidf; __floatunsisf;
+ __gedf2; __gesf2; __gtdf2; __gtsf2; __ledf2; __lesf2; __ltdf2; __ltsf2;
+ __muldf3; __mulsf3; __nedf2; __nesf2; __negdf2; __negsf2;
+ __subdf3; __subsf3; __truncdfsf2; __unorddf2; __unordsf2;
+ __syscall_error;
+ __mcount;
+ }
+}
diff --git a/sysdeps/arc/configure b/sysdeps/arc/configure
new file mode 100644
index 000000000000..2033957d0d9f
--- /dev/null
+++ b/sysdeps/arc/configure
@@ -0,0 +1,17 @@
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/arc.
+
+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
+libc_cv_have_sdata_section=no
+
+# For ARC, historically ; was used for comments and not newline
+# Later # also got added to comment list, but ; couldn't be switched to
+# canonical newline as there's lots of code out there which will break
+libc_cv_asm_line_sep='`'
+cat >>confdefs.h <<_ACEOF
+#define ASM_LINE_SEP $libc_cv_asm_line_sep
+_ACEOF
+
+
+libc_cv_fpie=no
diff --git a/sysdeps/arc/configure.ac b/sysdeps/arc/configure.ac
new file mode 100644
index 000000000000..91e58efb35c8
--- /dev/null
+++ b/sysdeps/arc/configure.ac
@@ -0,0 +1,13 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/arc.
+
+AC_DEFINE(PI_STATIC_AND_HIDDEN)
+libc_cv_have_sdata_section=no
+
+# For ARC, historically ; was used for comments and not newline
+# Later # also got added to comment list, but ; couldn't be switched to
+# canonical newline as there's lots of code out there which will break
+libc_cv_asm_line_sep='`'
+AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
+
+libc_cv_fpie=no
diff --git a/sysdeps/arc/nptl/Makefile b/sysdeps/arc/nptl/Makefile
new file mode 100644
index 000000000000..afeb58a8c1cb
--- /dev/null
+++ b/sysdeps/arc/nptl/Makefile
@@ -0,0 +1,22 @@
+# NPTL makefile fragment for ARC.
+# 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
+# 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/>.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/sysdeps/arc/preconfigure b/sysdeps/arc/preconfigure
new file mode 100644
index 000000000000..1152a179c4aa
--- /dev/null
+++ b/sysdeps/arc/preconfigure
@@ -0,0 +1,14 @@
+case "$machine" in
+arc*)
+ base_machine=arc
+ machine=arc
+ ;;
+esac
+
+gccfloat=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep __ARC_FPU_| wc -l`
+if test "$gccfloat" != "0"; then
+ echo "glibc being configured for double precision floating point"
+ with_fp_cond=1
+else
+ with_fp_cond=0
+fi
diff --git a/sysdeps/unix/sysv/linux/arc/Implies b/sysdeps/unix/sysv/linux/arc/Implies
new file mode 100644
index 000000000000..7f739a0340b6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/Implies
@@ -0,0 +1,3 @@
+arc/nptl
+unix/sysv/linux/generic/wordsize-32
+unix/sysv/linux/generic
diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile
new file mode 100644
index 000000000000..76e5d24daea2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/Makefile
@@ -0,0 +1,16 @@
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
+
+ifeq ($(subdir),misc)
+# MIPS/Tile-style cacheflush routine
+sysdep_headers += sys/cachectl.h
+sysdep_routines += cacheflush
+endif
+
+ifeq ($(subdir),elf)
+ifeq ($(build-shared),yes)
+# This is needed for DSO loading from static binaries.
+sysdep-dl-routines += dl-static
+endif
+endif
diff --git a/sysdeps/unix/sysv/linux/arc/Versions b/sysdeps/unix/sysv/linux/arc/Versions
new file mode 100644
index 000000000000..ac3327426360
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/Versions
@@ -0,0 +1,12 @@
+ld {
+ GLIBC_PRIVATE {
+ # used for loading by static libraries
+ _dl_var_init;
+ }
+}
+libc {
+ GLIBC_2.29 {
+ _flush_cache;
+ cacheflush;
+ }
+}
diff --git a/sysdeps/unix/sysv/linux/arc/configure b/sysdeps/unix/sysv/linux/arc/configure
new file mode 100644
index 000000000000..f74fa7cb0259
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/configure
@@ -0,0 +1,4 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/arc.
+
+arch_minimum_kernel=3.9.0
diff --git a/sysdeps/unix/sysv/linux/arc/configure.ac b/sysdeps/unix/sysv/linux/arc/configure.ac
new file mode 100644
index 000000000000..a9528032d32a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/configure.ac
@@ -0,0 +1,4 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/arc.
+
+arch_minimum_kernel=3.9.0
diff --git a/sysdeps/unix/sysv/linux/arc/shlib-versions b/sysdeps/unix/sysv/linux/arc/shlib-versions
new file mode 100644
index 000000000000..e527acd77892
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/shlib-versions
@@ -0,0 +1,2 @@
+DEFAULT GLIBC_2.29
+ld=ld-linux-arc.so.2
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 18/21] ARC: testsuite fix: GD TLS issue
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
2018-12-18 21:05 ` [PATCH 16/21] ARC: testsuite fix: sysvipc/* Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 03/21] ARC: ABI Implementation Vineet Gupta
` (21 subsequent siblings)
23 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Cupertino Miranda, Vineet Gupta
From: Cupertino Miranda <cmiranda@synopsys.com>
Offset set by the linker in the GOT entries would be overwritten by the dynamic
loader instead of added to the symbol location.
Other target have the same approach on DTSOFF relocs.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 4 ++++
sysdeps/arc/dl-machine.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 39ff298b0091..ec068c7c5925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-17 Cupertino Miranda <cmiranda@synopsys.com>
+
+ * sysdeps/arc/dl-machine.h: Fix relocation.
+
2018-12-17 Vineet Gupta <vgupta@synopsys.com>
* sysdeps/unix/make-syscalls.sh: Fix comment referencing
diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h
index 02727a3a4d47..f4757904084a 100644
--- a/sysdeps/arc/dl-machine.h
+++ b/sysdeps/arc/dl-machine.h
@@ -290,7 +290,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
case R_ARC_TLS_DTPOFF:
if (sym != NULL)
{
- *reloc_addr = sym->st_value;
+ *reloc_addr += sym->st_value;
}
break;
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (3 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 20/21] build-many-glibcs.py: Enable ARC builds Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 21:28 ` Florian Weimer
2018-12-18 21:05 ` [PATCH 04/21] ARC: startup and dynamic linking code Vineet Gupta
` (18 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 1 +
sysdeps/unix/sysv/linux/syscall-names.list | 3 +++
2 files changed, 4 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 4182e89ccbb3..3735df67a3b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -91,6 +91,7 @@
* sysdeps/unix/sysv/linux/arc/libthread_db.abilist: New file.
* sysdeps/unix/sysv/linux/arc/libutil.abilist: New file.
* sysdeps/unix/sysv/linux/arc/localplt.data: New file.
+ * sysdeps/unix/sysv/linux/syscall-names.list: Update for ARC.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
index f88001c9c38d..62862010600f 100644
--- a/sysdeps/unix/sysv/linux/syscall-names.list
+++ b/sysdeps/unix/sysv/linux/syscall-names.list
@@ -42,6 +42,9 @@ adjtimex
afs_syscall
alarm
alloc_hugepages
+arc_gettls
+arc_settls
+arc_usr_cmpxchg
arch_prctl
arm_fadvise64_64
arm_sync_file_range
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (14 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 21:29 ` Florian Weimer
2018-12-18 21:05 ` [PATCH 09/21] ARC: Linux ABI Vineet Gupta
` (7 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
ARC linker scripts have defined __start as entry point so to not break
ABI for uClibc et al we allow __start for glibc as well
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 3 +++
sysdeps/arc/dl-machine.h | 14 ++++++++++----
sysdeps/arc/entry.h | 5 +++++
sysdeps/arc/start.S | 14 +++++++++++---
4 files changed, 29 insertions(+), 7 deletions(-)
create mode 100644 sysdeps/arc/entry.h
diff --git a/ChangeLog b/ChangeLog
index 6628960c487e..86e4db890850 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -105,6 +105,9 @@
* sysdeps/unix/sysv/linux/arc/configure: New file.
* sysdeps/unix/sysv/linux/arc/configure.ac: New file.
* sysdeps/unix/sysv/linux/arc/shlib-versions: New file.
+ * sysdeps/arc/dl-machine.h: replace _start with __start.
+ * sysdeps/arc/start.S: likewise.
+ * sysdeps/arc/entry.h: Add ENTRY_POINT define check.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h
index da1aef79152d..02727a3a4d47 100644
--- a/sysdeps/arc/dl-machine.h
+++ b/sysdeps/arc/dl-machine.h
@@ -21,6 +21,12 @@
#define ELF_MACHINE_NAME "arc"
+#include <entry.h>
+
+#ifndef ENTRY_POINT
+#error ENTRY_POINT needs to be defined for ARC
+#endif
+
#include <string.h>
#include <link.h>
#include <dl-tls.h>
@@ -150,9 +156,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#define RTLD_START asm ("\
.text \n\
-.globl _start \n\
-.type _start, @function \n\
-_start: \n\
+.globl __start \n\
+.type __start, @function \n\
+__start: \n\
; (1). bootstrap ld.so \n\
bl.d _dl_start \n\
mov_s r0, sp ; pass ptr to aux vector tbl \n\
@@ -182,7 +188,7 @@ _start: \n\
add r0, pcl, _dl_fini@pcl \n\
j [r13] \n\
\n\
- .size _start,.-_start \n\
+ .size __start,.-__start \n\
.previous \n\
");
diff --git a/sysdeps/arc/entry.h b/sysdeps/arc/entry.h
new file mode 100644
index 000000000000..adb01d981afd
--- /dev/null
+++ b/sysdeps/arc/entry.h
@@ -0,0 +1,5 @@
+#ifndef __ASSEMBLY__
+extern void __start (void) attribute_hidden;
+#endif
+
+#define ENTRY_POINT __start
diff --git a/sysdeps/arc/start.S b/sysdeps/arc/start.S
index 119d596db07f..79e73e27d00d 100644
--- a/sysdeps/arc/start.S
+++ b/sysdeps/arc/start.S
@@ -34,7 +34,14 @@
<http://www.gnu.org/licenses/>. */
+#define __ASSEMBLY__ 1
+#include <entry.h>
+#ifndef ENTRY_POINT
+#error ENTRY_POINT needs to be defined for ARC
+#endif
+
/* When we enter this piece of code, the program stack looks like this:
+
argc argument counter (integer)
argv[0] program name (pointer)
argv[1...N] program args (pointers)
@@ -45,9 +52,9 @@
*/
.text
.align 4
- .global _start
- .type _start,@function
-_start:
+ .global __start
+ .type __start,@function
+__start:
mov fp, 0
ld_s r1, [sp] ; argc
@@ -71,6 +78,7 @@ _start:
/* Should never get here.... */
flag 1
+ .size __start,.-__start
/* Define a symbol for the first piece of initialized data. */
.data
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 00/21] glibc port to ARC processors
@ 2018-12-18 21:05 Vineet Gupta
2018-12-18 21:05 ` [PATCH 16/21] ARC: testsuite fix: sysvipc/* Vineet Gupta
` (23 more replies)
0 siblings, 24 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Hi,
This is reposting of glibc port to ARC processors from synopsys.
The original posting was a while back [1]. The issues at the time were
(1). Need for working upstream gcc/binutils (vs. the github forks)
(2). Too many testsuite failures.
All the ducks seem to be in a row now, with last remaining gcc patch backported to
gcc-8-branch last week [2] and testsuite failures tended to/reduced significantly.
(a) build-many-glibcs.py check results are clean
| Summary of test results:
| 1173 PASS
| 15 XFAIL
|
| PASS: glibcs-arc-linux-gnu check
(b) Full testsuite ran in a cross compile setup using buildroot on HSDK development
platform.
Summary of test results:
24 FAIL
5124 PASS
27 UNSUPPORTED
19 XFAIL
| FAIL: localedata/sort-test # Needs more RAM:
| FAIL: stdio-common/bug22 # Needs more RAM: 2 GB memory
| FAIL: sunrpc/bug20790 # missing cpp on target
| FAIL: nptl/test-mutexattr-printers # need Python3 and target GDB on target
| FAIL: nptl/test-mutex-printers # need Python3 and target GDB on target
| FAIL: nptl/test-condattr-printers # need Python3 and target GDB on target
| FAIL: nptl/test-cond-printers # need Python3 and target GDB on target
| FAIL: nptl/test-rwlockattr-printers # need Python3 and target GDB on target
| FAIL: nptl/test-rwlock-printers # need Python3 and target GDB on target
| FAIL: iconv/test-iconvconfig # Needs gconv installed
| FAIL: posix/bug-ga2 # DNS issue: google DNS vs. SNPS
| FAIL: posix/tst-getaddrinfo5 # DNS server not configured
| FAIL: posix/globtest # require same user on target and host
| FAIL: elf/check-localplt # passes for build-many-glibcs.py
# buildroot builds with slightly different toggles (-Os)
# such that gcc generates an extra memcpy PLT call
| FAIL: gmon/tst-gmon-pie-gprof
| FAIL: gmon/tst-sprofil
| FAIL: posix/tst-spawn
| FAIL: posix/tst-spawn-static
| FAIL: nptl/tst-cond16
| FAIL: nptl/tst-cond17
| FAIL: nptl/tst-umask1
| FAIL: nptl/tst-setuid2
| FAIL: nss/bug-erange
| FAIL: nss/tst-nss-test3
The full log for above can be found at [3]
Bulk of failures are due to cross test setup and/or RAM accessible on target.
We are analysing the other failures and will tend to them as we go along.
(c) Code was rebased off of master yesterday. Please review and comment.
(d) We currently only support soft float ABI, although I'm working on hard float
and hopefully will have it ready sometime during the review of this series
Thx,
-Vineet
[1] https://sourceware.org/ml/libc-alpha/2017-06/msg01355.html
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88001
[3] https://github.com/foss-for-synopsys-dwc-arc-processors/glibc/issues/1
Cupertino Miranda (2):
ARC: testsuite fix: GD TLS issue
ARC: fix several unwining and cancelation tests
Vineet Gupta (19):
longlong.h: sync from gcc to fix ARC inline asm constraints
ARC: add definitions to elf/elf.h
ARC: ABI Implementation
ARC: startup and dynamic linking code
ARC: Thread Local Storage support
ARC: Atomics and Locking primitives
ARC: math soft float support
ARC: Linux Syscall Interface
ARC: Linux ABI
ARC: Linux Startup and Dynamic Loading
ARC: ABI lists
ARC: Update syscall-names.list for ARC specific syscalls
ARC: Build Infrastructure
ARC: Enable __start as entry point vs. canonical _start
ARC: testsuite fix: elf/check-initfini
ARC: testsuite fix: sysvipc/*
ARC: testsuite fix: stdlib/tst-makecontext
build-many-glibcs.py: Enable ARC builds
NEWS: mention ARC port
ChangeLog | 127 ++
NEWS | 2 +
elf/elf.h | 70 +-
scripts/build-many-glibcs.py | 4 +
stdlib/longlong.h | 65 +-
sysdeps/arc/Implies | 3 +
sysdeps/arc/Makefile | 25 +
sysdeps/arc/Versions | 14 +
sysdeps/arc/__longjmp.S | 50 +
sysdeps/arc/abort-instr.h | 2 +
sysdeps/arc/atomic-machine.h | 89 +
sysdeps/arc/bits/endian.h | 12 +
sysdeps/arc/bits/fenv.h | 92 +
sysdeps/arc/bits/link.h | 52 +
sysdeps/arc/bits/setjmp.h | 33 +
sysdeps/arc/bsd-_setjmp.S | 1 +
sysdeps/arc/bsd-setjmp.S | 1 +
sysdeps/arc/configure | 17 +
sysdeps/arc/configure.ac | 13 +
sysdeps/arc/crti.S | 79 +
sysdeps/arc/crtn.S | 56 +
sysdeps/arc/dl-machine.h | 339 ++++
sysdeps/arc/dl-runtime.c | 21 +
sysdeps/arc/dl-sysdep.h | 25 +
sysdeps/arc/dl-tls.h | 30 +
sysdeps/arc/dl-trampoline.S | 81 +
sysdeps/arc/entry.h | 5 +
sysdeps/arc/gccframe.h | 21 +
sysdeps/arc/gmp-mparam.h | 23 +
sysdeps/arc/jmpbuf-offsets.h | 46 +
sysdeps/arc/jmpbuf-unwind.h | 47 +
sysdeps/arc/ldsodefs.h | 43 +
sysdeps/arc/libc-tls.c | 27 +
sysdeps/arc/machine-gmon.h | 33 +
sysdeps/arc/math_private.h | 6 +
sysdeps/arc/memusage.h | 23 +
sysdeps/arc/nofpu/Implies | 1 +
sysdeps/arc/nofpu/libm-test-ulps | 390 ++++
sysdeps/arc/nofpu/libm-test-ulps-name | 1 +
sysdeps/arc/nofpu/math-tests-exception.h | 27 +
sysdeps/arc/nofpu/math-tests-rounding.h | 27 +
sysdeps/arc/nptl/Makefile | 22 +
sysdeps/arc/nptl/bits/pthreadtypes-arch.h | 72 +
sysdeps/arc/nptl/bits/semaphore.h | 32 +
sysdeps/arc/nptl/pthread-offsets.h | 5 +
sysdeps/arc/nptl/pthreaddef.h | 32 +
sysdeps/arc/nptl/tcb-offsets.sym | 11 +
sysdeps/arc/nptl/tls.h | 150 ++
sysdeps/arc/preconfigure | 14 +
sysdeps/arc/setjmp.S | 64 +
sysdeps/arc/sfp-machine.h | 51 +
sysdeps/arc/sotruss-lib.c | 51 +
sysdeps/arc/stackinfo.h | 33 +
sysdeps/arc/start.S | 89 +
sysdeps/arc/sysdep.h | 51 +
sysdeps/arc/tls-macros.h | 29 +
sysdeps/arc/tst-audit.h | 23 +
sysdeps/unix/sysv/linux/arc/Implies | 3 +
sysdeps/unix/sysv/linux/arc/Makefile | 20 +
sysdeps/unix/sysv/linux/arc/Versions | 16 +
sysdeps/unix/sysv/linux/arc/bits/procfs-id.h | 25 +
sysdeps/unix/sysv/linux/arc/bits/procfs.h | 35 +
sysdeps/unix/sysv/linux/arc/bits/sigaction.h | 85 +
sysdeps/unix/sysv/linux/arc/c++-types.data | 67 +
sysdeps/unix/sysv/linux/arc/cacheflush.c | 29 +
sysdeps/unix/sysv/linux/arc/clone.S | 100 +
sysdeps/unix/sysv/linux/arc/configure | 4 +
sysdeps/unix/sysv/linux/arc/configure.ac | 4 +
sysdeps/unix/sysv/linux/arc/dl-static.c | 84 +
sysdeps/unix/sysv/linux/arc/getcontext.S | 65 +
sysdeps/unix/sysv/linux/arc/ipc_priv.h | 21 +
sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h | 6 +
sysdeps/unix/sysv/linux/arc/kernel-features.h | 28 +
sysdeps/unix/sysv/linux/arc/ld.abilist | 9 +
sysdeps/unix/sysv/linux/arc/ldconfig.h | 25 +
sysdeps/unix/sysv/linux/arc/ldsodefs.h | 32 +
.../unix/sysv/linux/arc/libBrokenLocale.abilist | 1 +
sysdeps/unix/sysv/linux/arc/libanl.abilist | 4 +
sysdeps/unix/sysv/linux/arc/libc.abilist | 2089 ++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/libcrypt.abilist | 2 +
sysdeps/unix/sysv/linux/arc/libdl.abilist | 9 +
sysdeps/unix/sysv/linux/arc/libm.abilist | 753 +++++++
sysdeps/unix/sysv/linux/arc/libnsl.abilist | 120 ++
sysdeps/unix/sysv/linux/arc/libpthread.abilist | 235 +++
sysdeps/unix/sysv/linux/arc/libresolv.abilist | 79 +
sysdeps/unix/sysv/linux/arc/librt.abilist | 35 +
sysdeps/unix/sysv/linux/arc/libthread_db.abilist | 40 +
sysdeps/unix/sysv/linux/arc/libutil.abilist | 6 +
sysdeps/unix/sysv/linux/arc/localplt.data | 15 +
sysdeps/unix/sysv/linux/arc/makecontext.c | 75 +
sysdeps/unix/sysv/linux/arc/mmap_internal.h | 26 +
sysdeps/unix/sysv/linux/arc/profil-counter.h | 2 +
sysdeps/unix/sysv/linux/arc/pt-vfork.S | 1 +
sysdeps/unix/sysv/linux/arc/setcontext.S | 95 +
sysdeps/unix/sysv/linux/arc/shlib-versions | 2 +
sysdeps/unix/sysv/linux/arc/sigaction.c | 63 +
sysdeps/unix/sysv/linux/arc/sigcontextinfo.h | 23 +
sysdeps/unix/sysv/linux/arc/sigrestorer.S | 28 +
sysdeps/unix/sysv/linux/arc/swapcontext.S | 92 +
sysdeps/unix/sysv/linux/arc/sys/cachectl.h | 36 +
sysdeps/unix/sysv/linux/arc/sys/ucontext.h | 71 +
sysdeps/unix/sysv/linux/arc/sys/user.h | 32 +
sysdeps/unix/sysv/linux/arc/syscall.S | 38 +
sysdeps/unix/sysv/linux/arc/sysdep.c | 33 +
sysdeps/unix/sysv/linux/arc/sysdep.h | 259 +++
sysdeps/unix/sysv/linux/arc/ucontext-macros.h | 29 +
sysdeps/unix/sysv/linux/arc/ucontext_i.sym | 20 +
sysdeps/unix/sysv/linux/arc/vfork.S | 42 +
sysdeps/unix/sysv/linux/syscall-names.list | 3 +
109 files changed, 7709 insertions(+), 59 deletions(-)
create mode 100644 sysdeps/arc/Implies
create mode 100644 sysdeps/arc/Makefile
create mode 100644 sysdeps/arc/Versions
create mode 100644 sysdeps/arc/__longjmp.S
create mode 100644 sysdeps/arc/abort-instr.h
create mode 100644 sysdeps/arc/atomic-machine.h
create mode 100644 sysdeps/arc/bits/endian.h
create mode 100644 sysdeps/arc/bits/fenv.h
create mode 100644 sysdeps/arc/bits/link.h
create mode 100644 sysdeps/arc/bits/setjmp.h
create mode 100644 sysdeps/arc/bsd-_setjmp.S
create mode 100644 sysdeps/arc/bsd-setjmp.S
create mode 100644 sysdeps/arc/configure
create mode 100644 sysdeps/arc/configure.ac
create mode 100644 sysdeps/arc/crti.S
create mode 100644 sysdeps/arc/crtn.S
create mode 100644 sysdeps/arc/dl-machine.h
create mode 100644 sysdeps/arc/dl-runtime.c
create mode 100644 sysdeps/arc/dl-sysdep.h
create mode 100644 sysdeps/arc/dl-tls.h
create mode 100644 sysdeps/arc/dl-trampoline.S
create mode 100644 sysdeps/arc/entry.h
create mode 100644 sysdeps/arc/gccframe.h
create mode 100644 sysdeps/arc/gmp-mparam.h
create mode 100644 sysdeps/arc/jmpbuf-offsets.h
create mode 100644 sysdeps/arc/jmpbuf-unwind.h
create mode 100644 sysdeps/arc/ldsodefs.h
create mode 100644 sysdeps/arc/libc-tls.c
create mode 100644 sysdeps/arc/machine-gmon.h
create mode 100644 sysdeps/arc/math_private.h
create mode 100644 sysdeps/arc/memusage.h
create mode 100644 sysdeps/arc/nofpu/Implies
create mode 100644 sysdeps/arc/nofpu/libm-test-ulps
create mode 100644 sysdeps/arc/nofpu/libm-test-ulps-name
create mode 100644 sysdeps/arc/nofpu/math-tests-exception.h
create mode 100644 sysdeps/arc/nofpu/math-tests-rounding.h
create mode 100644 sysdeps/arc/nptl/Makefile
create mode 100644 sysdeps/arc/nptl/bits/pthreadtypes-arch.h
create mode 100644 sysdeps/arc/nptl/bits/semaphore.h
create mode 100644 sysdeps/arc/nptl/pthread-offsets.h
create mode 100644 sysdeps/arc/nptl/pthreaddef.h
create mode 100644 sysdeps/arc/nptl/tcb-offsets.sym
create mode 100644 sysdeps/arc/nptl/tls.h
create mode 100644 sysdeps/arc/preconfigure
create mode 100644 sysdeps/arc/setjmp.S
create mode 100644 sysdeps/arc/sfp-machine.h
create mode 100644 sysdeps/arc/sotruss-lib.c
create mode 100644 sysdeps/arc/stackinfo.h
create mode 100644 sysdeps/arc/start.S
create mode 100644 sysdeps/arc/sysdep.h
create mode 100644 sysdeps/arc/tls-macros.h
create mode 100644 sysdeps/arc/tst-audit.h
create mode 100644 sysdeps/unix/sysv/linux/arc/Implies
create mode 100644 sysdeps/unix/sysv/linux/arc/Makefile
create mode 100644 sysdeps/unix/sysv/linux/arc/Versions
create mode 100644 sysdeps/unix/sysv/linux/arc/bits/procfs-id.h
create mode 100644 sysdeps/unix/sysv/linux/arc/bits/procfs.h
create mode 100644 sysdeps/unix/sysv/linux/arc/bits/sigaction.h
create mode 100644 sysdeps/unix/sysv/linux/arc/c++-types.data
create mode 100644 sysdeps/unix/sysv/linux/arc/cacheflush.c
create mode 100644 sysdeps/unix/sysv/linux/arc/clone.S
create mode 100644 sysdeps/unix/sysv/linux/arc/configure
create mode 100644 sysdeps/unix/sysv/linux/arc/configure.ac
create mode 100644 sysdeps/unix/sysv/linux/arc/dl-static.c
create mode 100644 sysdeps/unix/sysv/linux/arc/getcontext.S
create mode 100644 sysdeps/unix/sysv/linux/arc/ipc_priv.h
create mode 100644 sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
create mode 100644 sysdeps/unix/sysv/linux/arc/kernel-features.h
create mode 100644 sysdeps/unix/sysv/linux/arc/ld.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/ldconfig.h
create mode 100644 sysdeps/unix/sysv/linux/arc/ldsodefs.h
create mode 100644 sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libanl.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libc.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libcrypt.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libdl.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libm.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libnsl.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libpthread.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libresolv.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/librt.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libthread_db.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/libutil.abilist
create mode 100644 sysdeps/unix/sysv/linux/arc/localplt.data
create mode 100644 sysdeps/unix/sysv/linux/arc/makecontext.c
create mode 100644 sysdeps/unix/sysv/linux/arc/mmap_internal.h
create mode 100644 sysdeps/unix/sysv/linux/arc/profil-counter.h
create mode 100644 sysdeps/unix/sysv/linux/arc/pt-vfork.S
create mode 100644 sysdeps/unix/sysv/linux/arc/setcontext.S
create mode 100644 sysdeps/unix/sysv/linux/arc/shlib-versions
create mode 100644 sysdeps/unix/sysv/linux/arc/sigaction.c
create mode 100644 sysdeps/unix/sysv/linux/arc/sigcontextinfo.h
create mode 100644 sysdeps/unix/sysv/linux/arc/sigrestorer.S
create mode 100644 sysdeps/unix/sysv/linux/arc/swapcontext.S
create mode 100644 sysdeps/unix/sysv/linux/arc/sys/cachectl.h
create mode 100644 sysdeps/unix/sysv/linux/arc/sys/ucontext.h
create mode 100644 sysdeps/unix/sysv/linux/arc/sys/user.h
create mode 100644 sysdeps/unix/sysv/linux/arc/syscall.S
create mode 100644 sysdeps/unix/sysv/linux/arc/sysdep.c
create mode 100644 sysdeps/unix/sysv/linux/arc/sysdep.h
create mode 100644 sysdeps/unix/sysv/linux/arc/ucontext-macros.h
create mode 100644 sysdeps/unix/sysv/linux/arc/ucontext_i.sym
create mode 100644 sysdeps/unix/sysv/linux/arc/vfork.S
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 03/21] ARC: ABI Implementation
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
2018-12-18 21:05 ` [PATCH 16/21] ARC: testsuite fix: sysvipc/* Vineet Gupta
2018-12-18 21:05 ` [PATCH 18/21] ARC: testsuite fix: GD TLS issue Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 23:11 ` Joseph Myers
2018-12-18 21:05 ` [PATCH 20/21] build-many-glibcs.py: Enable ARC builds Vineet Gupta
` (20 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
This code deals with the ARC ABI.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 20 ++++++++++++
sysdeps/arc/__longjmp.S | 50 ++++++++++++++++++++++++++++
sysdeps/arc/abort-instr.h | 2 ++
sysdeps/arc/bits/endian.h | 12 +++++++
sysdeps/arc/bits/setjmp.h | 33 +++++++++++++++++++
sysdeps/arc/bsd-_setjmp.S | 1 +
sysdeps/arc/bsd-setjmp.S | 1 +
sysdeps/arc/crti.S | 77 ++++++++++++++++++++++++++++++++++++++++++++
sysdeps/arc/crtn.S | 56 ++++++++++++++++++++++++++++++++
sysdeps/arc/dl-runtime.c | 21 ++++++++++++
sysdeps/arc/dl-sysdep.h | 25 ++++++++++++++
sysdeps/arc/dl-trampoline.S | 72 +++++++++++++++++++++++++++++++++++++++++
sysdeps/arc/gccframe.h | 21 ++++++++++++
sysdeps/arc/gmp-mparam.h | 23 +++++++++++++
sysdeps/arc/jmpbuf-offsets.h | 46 ++++++++++++++++++++++++++
sysdeps/arc/jmpbuf-unwind.h | 47 +++++++++++++++++++++++++++
sysdeps/arc/machine-gmon.h | 33 +++++++++++++++++++
sysdeps/arc/memusage.h | 23 +++++++++++++
sysdeps/arc/setjmp.S | 64 ++++++++++++++++++++++++++++++++++++
sysdeps/arc/sysdep.h | 49 ++++++++++++++++++++++++++++
sysdeps/arc/tls-macros.h | 29 +++++++++++++++++
21 files changed, 705 insertions(+)
create mode 100644 sysdeps/arc/__longjmp.S
create mode 100644 sysdeps/arc/abort-instr.h
create mode 100644 sysdeps/arc/bits/endian.h
create mode 100644 sysdeps/arc/bits/setjmp.h
create mode 100644 sysdeps/arc/bsd-_setjmp.S
create mode 100644 sysdeps/arc/bsd-setjmp.S
create mode 100644 sysdeps/arc/crti.S
create mode 100644 sysdeps/arc/crtn.S
create mode 100644 sysdeps/arc/dl-runtime.c
create mode 100644 sysdeps/arc/dl-sysdep.h
create mode 100644 sysdeps/arc/dl-trampoline.S
create mode 100644 sysdeps/arc/gccframe.h
create mode 100644 sysdeps/arc/gmp-mparam.h
create mode 100644 sysdeps/arc/jmpbuf-offsets.h
create mode 100644 sysdeps/arc/jmpbuf-unwind.h
create mode 100644 sysdeps/arc/machine-gmon.h
create mode 100644 sysdeps/arc/memusage.h
create mode 100644 sysdeps/arc/setjmp.S
create mode 100644 sysdeps/arc/sysdep.h
create mode 100644 sysdeps/arc/tls-macros.h
diff --git a/ChangeLog b/ChangeLog
index 3ec6eb82d2fe..c2efdafa9861 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,26 @@
syscall-template file.
* stdlib/longlong.h: Fix asm constraints for ARC code.
* elf/elf.h: add defines for ARC.
+ * sysdeps/arc/__longjmp.S: New file.
+ * sysdeps/arc/abort-instr.h: New file.
+ * sysdeps/arc/bits/endian.h: New file.
+ * sysdeps/arc/bits/setjmp.h: New file.
+ * sysdeps/arc/bsd-_setjmp.S: New file.
+ * sysdeps/arc/bsd-setjmp.S: New file.
+ * sysdeps/arc/crti.S: New file.
+ * sysdeps/arc/crtn.S: New file.
+ * sysdeps/arc/dl-runtime.c: New file.
+ * sysdeps/arc/dl-sysdep.h: New file.
+ * sysdeps/arc/dl-trampoline.S: New file.
+ * sysdeps/arc/gccframe.h: New file.
+ * sysdeps/arc/gmp-mparam.h: New file.
+ * sysdeps/arc/jmpbuf-offsets.h: New file.
+ * sysdeps/arc/jmpbuf-unwind.h: New file.
+ * sysdeps/arc/machine-gmon.h: New file.
+ * sysdeps/arc/memusage.h: New file.
+ * sysdeps/arc/setjmp.S: New file.
+ * sysdeps/arc/sysdep.h: New file.
+ * sysdeps/arc/tls-macros.h: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/__longjmp.S b/sysdeps/arc/__longjmp.S
new file mode 100644
index 000000000000..5ef271536bcc
--- /dev/null
+++ b/sysdeps/arc/__longjmp.S
@@ -0,0 +1,50 @@
+/* longjmp for ARC.
+ 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
+ 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 <jmpbuf-offsets.h>
+
+;@ r0 = jump buffer from which regs will be restored
+;@ r1 = value that setjmp( ) will return due to this longjmp
+
+ENTRY(__longjmp)
+
+ ld_s r13, [r0]
+ ld_s r14, [r0,4]
+ ld r15, [r0,8]
+ ld r16, [r0,12]
+ ld r17, [r0,16]
+ ld r18, [r0,20]
+ ld r19, [r0,24]
+ ld r20, [r0,28]
+ ld r21, [r0,32]
+ ld r22, [r0,36]
+ ld r23, [r0,40]
+ ld r24, [r0,44]
+ ld r25, [r0,48]
+
+ ld blink, [r0,60]
+ ld fp, [r0,52]
+ ld sp, [r0,56]
+
+ mov.f r0, r1 ; get the setjmp return value(due to longjmp) in place
+
+ j.d [blink] ; to caller of setjmp location, right after the call
+ mov.z r0, 1 ; can't let setjmp return 0 when it is due to longjmp
+
+END(__longjmp)
diff --git a/sysdeps/arc/abort-instr.h b/sysdeps/arc/abort-instr.h
new file mode 100644
index 000000000000..474098e9a819
--- /dev/null
+++ b/sysdeps/arc/abort-instr.h
@@ -0,0 +1,2 @@
+/* FLAG 1 is privilege mode only instruction, hence will crash any program */
+#define ABORT_INSTRUCTION asm ("flag 1")
diff --git a/sysdeps/arc/bits/endian.h b/sysdeps/arc/bits/endian.h
new file mode 100644
index 000000000000..88fbcf39a58a
--- /dev/null
+++ b/sysdeps/arc/bits/endian.h
@@ -0,0 +1,12 @@
+/* The ARC architecture has selectable endianness. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#ifdef __BIG_ENDIAN__
+# define __BYTE_ORDER __BIG_ENDIAN
+#endif
+#ifdef __LITTLE_ENDIAN__
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
diff --git a/sysdeps/arc/bits/setjmp.h b/sysdeps/arc/bits/setjmp.h
new file mode 100644
index 000000000000..3a014955ee5a
--- /dev/null
+++ b/sysdeps/arc/bits/setjmp.h
@@ -0,0 +1,33 @@
+/* Define the machine-dependent type `jmp_buf'. ARC version.
+ Copyright (C) 1992-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
+ 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/>. */
+
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined(_SETJMP_H) && !defined(_PTHREAD_H)
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#ifndef __ASSEMBLER__
+
+/* Saves r13-r25 (callee-saved), fp (frame pointer), sp (stack pointer),
+ * blink (branch-n-link) */
+typedef int __jmp_buf[32];
+#endif
+
+#endif
diff --git a/sysdeps/arc/bsd-_setjmp.S b/sysdeps/arc/bsd-_setjmp.S
new file mode 100644
index 000000000000..4e6a2da560c4
--- /dev/null
+++ b/sysdeps/arc/bsd-_setjmp.S
@@ -0,0 +1 @@
+/* _setjmp is in setjmp.S */
diff --git a/sysdeps/arc/bsd-setjmp.S b/sysdeps/arc/bsd-setjmp.S
new file mode 100644
index 000000000000..1da848d2f1ee
--- /dev/null
+++ b/sysdeps/arc/bsd-setjmp.S
@@ -0,0 +1 @@
+/* setjmp is in setjmp.S */
diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S
new file mode 100644
index 000000000000..8b823b54a29d
--- /dev/null
+++ b/sysdeps/arc/crti.S
@@ -0,0 +1,77 @@
+/* Special .init and .fini section support for ARC.
+ 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
+ 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.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ 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 <libc-symbols.h>
+#include <sysdep.h>
+
+#ifndef PREINIT_FUNCTION
+# define PREINIT_FUNCTION __gmon_start__
+#endif
+
+#ifndef PREINIT_FUNCTION_WEAK
+# define PREINIT_FUNCTION_WEAK 1
+#endif
+
+#if PREINIT_FUNCTION_WEAK
+ weak_extern (PREINIT_FUNCTION)
+#else
+ .hidden PREINIT_FUNCTION
+#endif
+
+ .section .init
+ .align 4
+ .global _init
+ .type _init,@function
+_init:
+ st.a blink, [sp,-4]
+ st.a fp, [sp,-4]
+ mov fp, sp
+#if PREINIT_FUNCTION_WEAK
+ ld r0, [pcl, @PREINIT_FUNCTION@gotpc]
+ tst r0, r0
+ jlnz [r0]
+#else
+ bl PREINIT_FUNCTION
+#endif
+
+ .section .fini
+ .align 4
+ .global _fini
+ .type _fini,@function
+_fini:
+ st.a blink,[sp,-4]
+ st.a fp,[sp,-4]
+ mov fp,sp
+ .align 4
diff --git a/sysdeps/arc/crtn.S b/sysdeps/arc/crtn.S
new file mode 100644
index 000000000000..c6c58c5593c9
--- /dev/null
+++ b/sysdeps/arc/crtn.S
@@ -0,0 +1,56 @@
+/* Special .init and .fini section support for ARC.
+ 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
+ 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.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ 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/>. */
+
+ .section .init
+ .align 4
+ .global _init
+ .type _init,@function
+ ; EPILOGUE
+ ld.ab fp,[sp,4]
+ ld blink,[sp,0]
+ j.d [blink]
+ add sp,sp,4
+; .size _init,.-_init
+
+ .section .fini
+ .align 4
+ .global _fini
+ .type _fini,@function
+ ; EPILOGUE
+ ld.ab fp,[sp,4]
+ ld blink,[sp,0]
+ j.d [blink]
+ add sp,sp,4
+; .size _fini,.-_fini
diff --git a/sysdeps/arc/dl-runtime.c b/sysdeps/arc/dl-runtime.c
new file mode 100644
index 000000000000..76d39fab5ab8
--- /dev/null
+++ b/sysdeps/arc/dl-runtime.c
@@ -0,0 +1,21 @@
+/* PLT jump into resolver passes PC of PLTn, while _dl_fixup expects the
+ address of corresponding .rela.plt entry */
+
+#ifdef __A7__
+#define ARC_PLT_SIZE 12
+#else
+#define ARC_PLT_SIZE 16
+#endif
+
+#define reloc_index \
+({ \
+ unsigned long plt0 = D_PTR (l, l_info[DT_PLTGOT]); \
+ unsigned long pltn = reloc_arg; \
+ /* exclude PL0 and PLT1 */ \
+ unsigned long idx = (pltn - plt0)/ARC_PLT_SIZE - 2; \
+ idx; \
+})
+
+#define reloc_offset reloc_index * sizeof (PLTREL)
+
+#include <elf/dl-runtime.c>
diff --git a/sysdeps/arc/dl-sysdep.h b/sysdeps/arc/dl-sysdep.h
new file mode 100644
index 000000000000..a3e734c1020c
--- /dev/null
+++ b/sysdeps/arc/dl-sysdep.h
@@ -0,0 +1,25 @@
+/* System-specific settings for dynamic linker code. ARC version.
+ Copyright (C) 2009-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
+ 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_next <dl-sysdep.h>
+
+/* _dl_argv cannot be attribute_relro, because _dl_start_user
+ might write into it after _dl_start returns. */
+#define DL_ARGV_NOT_RELRO 1
+
+#define DL_EXTERN_PROTECTED_DATA
diff --git a/sysdeps/arc/dl-trampoline.S b/sysdeps/arc/dl-trampoline.S
new file mode 100644
index 000000000000..c704f0ff9a95
--- /dev/null
+++ b/sysdeps/arc/dl-trampoline.S
@@ -0,0 +1,72 @@
+/* PLT trampolines. ARC version.
+ 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
+ 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 <libc-symbols.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+; Save the registers which resolver could possibly clobber
+; r0-r9: args to the function - symbol being resolved
+; r10-r12 are already clobbered by PLTn, PLT0 thus neednot be saved
+
+.macro SAVE_CALLER_SAVED
+ push_s r0
+ push_s r1
+ push_s r2
+ push_s r3
+ st.a r4, [sp, -4]
+ st.a r5, [sp, -4]
+ st.a r6, [sp, -4]
+ st.a r7, [sp, -4]
+ st.a r8, [sp, -4]
+ st.a r9, [sp, -4]
+ push_s blink
+.endm
+
+.macro RESTORE_CALLER_SAVED_BUT_R0
+ ld.ab blink,[sp, 4]
+ ld.ab r9, [sp, 4]
+ ld.ab r8, [sp, 4]
+ ld.ab r7, [sp, 4]
+ ld.ab r6, [sp, 4]
+ ld.ab r5, [sp, 4]
+ ld.ab r4, [sp, 4]
+ pop_s r3
+ pop_s r2
+ pop_s r1
+.endm
+
+; Upon entry, PLTn, which led us here, sets up the following regs
+; r11 = Module info (tpnt pointer as expected by resolver)
+; r12 = PC of the PLTn itself - needed by resolver to find
+; corresponding .rela.plt entry
+
+ENTRY(_dl_runtime_resolve)
+ ; args to func being resolved, which resolver might clobber
+ SAVE_CALLER_SAVED
+
+ mov_s r1, r12
+ bl.d _dl_fixup
+ mov r0, r11
+
+ RESTORE_CALLER_SAVED_BUT_R0
+ j_s.d [r0] ; r0 has resolved function addr
+ pop_s r0 ; restore first arg to resolved call
+END(_dl_runtime_resolve)
diff --git a/sysdeps/arc/gccframe.h b/sysdeps/arc/gccframe.h
new file mode 100644
index 000000000000..54a1225284b6
--- /dev/null
+++ b/sysdeps/arc/gccframe.h
@@ -0,0 +1,21 @@
+/* Definition of object in frame unwind info. ARC 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
+ 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/>. */
+
+#define FIRST_PSEUDO_REGISTER 40
+
+#include <sysdeps/generic/gccframe.h>
diff --git a/sysdeps/arc/gmp-mparam.h b/sysdeps/arc/gmp-mparam.h
new file mode 100644
index 000000000000..2b09517766e3
--- /dev/null
+++ b/sysdeps/arc/gmp-mparam.h
@@ -0,0 +1,23 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 2017-2018 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#include <sysdeps/generic/gmp-mparam.h>
+
+#define IEEE_DOUBLE_BIG_ENDIAN 0
diff --git a/sysdeps/arc/jmpbuf-offsets.h b/sysdeps/arc/jmpbuf-offsets.h
new file mode 100644
index 000000000000..c9cf4bc2e355
--- /dev/null
+++ b/sysdeps/arc/jmpbuf-offsets.h
@@ -0,0 +1,46 @@
+/* Private macros for accessing __jmp_buf contents. ARC version.
+ Copyright (C) 2006-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
+ 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/>. */
+
+/* Save offsets within __jmp_buf. */
+/* We don't use most of these symbols; they are here for documentation. */
+
+/* Callee Regs */
+#define JB_R13 0
+#define JB_R14 1
+#define JB_R15 2
+#define JB_R16 3
+#define JB_R17 4
+#define JB_R18 5
+#define JB_R19 6
+#define JB_R20 7
+#define JB_R21 8
+#define JB_R22 9
+#define JB_R23 10
+#define JB_R24 11
+#define JB_R25 12
+
+/* Frame Pointer, Stack Pointer, Branch-n-link */
+#define JB_FP 13
+#define JB_SP 14
+#define JB_BLINK 15
+
+/* We save space for some extra state to accommodate future changes. */
+#define JB_NUM 32 /* words */
+
+/* Helper for generic ____longjmp_chk(). */
+#define JB_FRAME_ADDRESS(buf) ((void *) (unsigned long) (buf[JB_SP]))
diff --git a/sysdeps/arc/jmpbuf-unwind.h b/sysdeps/arc/jmpbuf-unwind.h
new file mode 100644
index 000000000000..d87ac13b3416
--- /dev/null
+++ b/sysdeps/arc/jmpbuf-unwind.h
@@ -0,0 +1,47 @@
+/* Examine __jmp_buf for unwinding frames. ARC version.
+ 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
+ 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 <setjmp.h>
+#include <jmpbuf-offsets.h>
+#include <stdint.h>
+#include <unwind.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle (jmpbuf[JB_SP]))
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf jmpbuf)
+{
+ uintptr_t sp = jmpbuf[JB_SP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf_sp (_jmpbuf) - (_adj)))
+
+/* We use the normal longjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/arc/machine-gmon.h b/sysdeps/arc/machine-gmon.h
new file mode 100644
index 000000000000..55facf77a858
--- /dev/null
+++ b/sysdeps/arc/machine-gmon.h
@@ -0,0 +1,33 @@
+/* Machine-dependent definitions for profiling support. ARC version.
+ 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
+ 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>
+
+#define _MCOUNT_DECL(frompc, selfpc)
+static void __mcount_internal (unsigned long frompc, unsigned long selfpc)
+
+/* this is very simple as gcc does all the heavy lifting at _mcount call site
+ * - sets up caller's blink in r0, so frompc is setup correctly
+ * - preserve argument registers for original call */
+
+#define MCOUNT \
+void _mcount (void *frompc) \
+{ \
+ __mcount_internal ((unsigned long int) frompc, \
+ (unsigned long int) __builtin_return_address(0)); \
+}
diff --git a/sysdeps/arc/memusage.h b/sysdeps/arc/memusage.h
new file mode 100644
index 000000000000..536f1fdbf614
--- /dev/null
+++ b/sysdeps/arc/memusage.h
@@ -0,0 +1,23 @@
+/* Machine-specific definitions for memory usage profiling, ARC version.
+ 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
+ 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/>. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
+
+#define uatomic32_t unsigned int
+
+#include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/arc/setjmp.S b/sysdeps/arc/setjmp.S
new file mode 100644
index 000000000000..cbd44e538339
--- /dev/null
+++ b/sysdeps/arc/setjmp.S
@@ -0,0 +1,64 @@
+/* setjmp for ARC.
+ Copyright (C) 1991-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
+ 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>
+
+;@ r0 = jump buffer into which regs will be saved
+ENTRY(setjmp)
+ b.d __sigsetjmp
+ mov r1, 1 ; save signals
+END(setjmp)
+
+;@ r0 = jump buffer into which regs will be saved
+ENTRY(_setjmp)
+ b.d __sigsetjmp
+ mov r1, 0 ; don't save signals
+END(_setjmp)
+libc_hidden_def(_setjmp)
+
+;@ r0 = jump buffer into which regs will be saved
+;@ r1 = do we need to save signals
+ENTRY(__sigsetjmp)
+
+ st_s r13, [r0]
+ st_s r14, [r0,4]
+ st r15, [r0,8]
+ st r16, [r0,12]
+ st r17, [r0,16]
+ st r18, [r0,20]
+ st r19, [r0,24]
+ st r20, [r0,28]
+ st r21, [r0,32]
+ st r22, [r0,36]
+ st r23, [r0,40]
+ st r24, [r0,44]
+ st r25, [r0,48]
+ st fp, [r0,52]
+ st sp, [r0,56]
+
+ ; make a note of where longjmp will return to.
+ ; that will be right next to this setjmp call-site which will be
+ ; contained in blink, since "C" caller of this routine will do
+ ; a branch-n-link
+
+ st blink, [r0,60]
+ b __sigjmp_save
+
+END(__sigsetjmp)
+libc_hidden_def(__sigsetjmp)
diff --git a/sysdeps/arc/sysdep.h b/sysdeps/arc/sysdep.h
new file mode 100644
index 000000000000..5c6e063d03fe
--- /dev/null
+++ b/sysdeps/arc/sysdep.h
@@ -0,0 +1,49 @@
+/* Assembler macros for ARC.
+ 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
+ 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 <sysdeps/generic/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+/* Syntactic details of assembler.
+ * One weirness is ; is not newline but comment
+ * Although # is also for comment
+ */
+
+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+
+#define ENTRY(name) \
+ .align 4 ASM_LINE_SEP \
+ .globl C_SYMBOL_NAME(name) ASM_LINE_SEP \
+ .type C_SYMBOL_NAME(name),%function ASM_LINE_SEP \
+ C_LABEL(name) ASM_LINE_SEP \
+ CALL_MCOUNT
+
+#undef END
+#define END(name) \
+ ASM_SIZE_DIRECTIVE(name)
+
+#ifdef SHARED
+#define PLTJMP(_x) _x##@plt
+#else
+#define PLTJMP(_x) _x
+#endif
+
+# define CALL_MCOUNT /* Do nothing for now. */
+
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/arc/tls-macros.h b/sysdeps/arc/tls-macros.h
new file mode 100644
index 000000000000..51855edef6e7
--- /dev/null
+++ b/sysdeps/arc/tls-macros.h
@@ -0,0 +1,29 @@
+/* Macros to support TLS testing in times of missing compiler support. */
+
+/* For now */
+#define TLS_LD(x) TLS_IE(x)
+
+#define TLS_GD(x) \
+ ({ int *__result; \
+ __asm__ ("add r0, pcl, @" #x "@tlsgd \n" \
+ ".tls_gd_ld " #x "`bl __tls_get_addr@plt \n" \
+ "mov %0, r0 \n" \
+ : "=&r" (__result) \
+ ::"r0","r1","r2","r3","r4","r5","r6","r7", \
+ "r8","r9","r10","r11","r12"); \
+ __result; })
+
+#define TLS_LE(x) \
+ ({ int *__result; \
+ void *tp = __builtin_thread_pointer(); \
+ __asm__ ("add %0, %1, @" #x "@tpoff \n" \
+ : "=r" (__result) : "r"(tp)); \
+ __result; })
+
+#define TLS_IE(x) \
+ ({ int *__result; \
+ void *tp = __builtin_thread_pointer(); \
+ __asm__ ("ld %0, [pcl, @" #x "@tlsie] \n" \
+ "add %0, %1, %0 \n" \
+ : "=&r" (__result) : "r" (tp)); \
+ __result; })
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (13 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 02/21] ARC: add definitions to elf/elf.h Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 22:59 ` Joseph Myers
2018-12-21 18:55 ` Joseph Myers
2018-12-18 21:05 ` [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start Vineet Gupta
` (8 subsequent siblings)
23 siblings, 2 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
This corresponds to the version
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue Jun 27 16:10:15 2017 +0000
* longlong.h: Remove ns32k support.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249696 138bc75d-0d04-0410-961f-82ee72b054a4
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 1 +
stdlib/longlong.h | 65 ++++++-------------------------------------------------
2 files changed, 8 insertions(+), 58 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 027b23493ed8..456e4b670c23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
* sysdeps/unix/make-syscalls.sh: Fix comment referencing
syscall-template file.
+ * stdlib/longlong.h: Fix asm constraints for ARC code.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index c7c6977c9fd6..fb982dd530c9 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -197,17 +197,17 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%r" ((USItype) (ah)), \
- "rIJ" ((USItype) (bh)), \
+ "rICal" ((USItype) (bh)), \
"%r" ((USItype) (al)), \
- "rIJ" ((USItype) (bl)))
+ "rICal" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "r" ((USItype) (ah)), \
- "rIJ" ((USItype) (bh)), \
+ "rICal" ((USItype) (bh)), \
"r" ((USItype) (al)), \
- "rIJ" ((USItype) (bl)))
+ "rICal" ((USItype) (bl)))
#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
#ifdef __ARC_NORM__
@@ -221,8 +221,8 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
} \
while (0)
#define COUNT_LEADING_ZEROS_0 32
-#endif
-#endif
+#endif /* __ARC_NORM__ */
+#endif /* __arc__ */
#if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__)) \
&& W_TYPE_SIZE == 32
@@ -858,42 +858,6 @@ extern UDItype __umulsidi3 (USItype, USItype);
#endif
#endif /* __mips__ */
-#if defined (__ns32000__) && W_TYPE_SIZE == 32
-#define umul_ppmm(w1, w0, u, v) \
- ({union {UDItype __ll; \
- struct {USItype __l, __h;} __i; \
- } __xx; \
- __asm__ ("meid %2,%0" \
- : "=g" (__xx.__ll) \
- : "%0" ((USItype) (u)), \
- "g" ((USItype) (v))); \
- (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
-#define __umulsidi3(u, v) \
- ({UDItype __w; \
- __asm__ ("meid %2,%0" \
- : "=g" (__w) \
- : "%0" ((USItype) (u)), \
- "g" ((USItype) (v))); \
- __w; })
-#define udiv_qrnnd(q, r, n1, n0, d) \
- ({union {UDItype __ll; \
- struct {USItype __l, __h;} __i; \
- } __xx; \
- __xx.__i.__h = (n1); __xx.__i.__l = (n0); \
- __asm__ ("deid %2,%0" \
- : "=g" (__xx.__ll) \
- : "0" (__xx.__ll), \
- "g" ((USItype) (d))); \
- (r) = __xx.__i.__l; (q) = __xx.__i.__h; })
-#define count_trailing_zeros(count,x) \
- do { \
- __asm__ ("ffsd %2,%0" \
- : "=r" ((USItype) (count)) \
- : "0" ((USItype) 0), \
- "r" ((USItype) (x))); \
- } while (0)
-#endif /* __ns32000__ */
-
/* FIXME: We should test _IBMR2 here when we add assembly support for the
system vendor compilers.
FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good
@@ -1086,7 +1050,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
} while (0)
#endif
-#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
+#if defined(__sh__) && W_TYPE_SIZE == 32
#ifndef __sh1__
#define umul_ppmm(w1, w0, u, v) \
__asm__ ( \
@@ -1159,21 +1123,6 @@ extern UDItype __umulsidi3 (USItype, USItype);
#endif /* __sh__ */
-#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32
-#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
-#define count_leading_zeros(count, x) \
- do \
- { \
- UDItype x_ = (USItype)(x); \
- SItype c_; \
- \
- __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \
- (count) = c_ - 31; \
- } \
- while (0)
-#define COUNT_LEADING_ZEROS_0 32
-#endif
-
#if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \
&& W_TYPE_SIZE == 32
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 20/21] build-many-glibcs.py: Enable ARC builds
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (2 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 03/21] ARC: ABI Implementation Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
` (19 subsequent siblings)
23 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 4 ++++
scripts/build-many-glibcs.py | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 376d0e401117..46d288808153 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-17 Vineet Gupta <vgupta@synopsys.com>
+
+ * scripts/build-many-glibcs.py: Enable building for ARC.
+
2018-12-17 Cupertino Miranda <cmiranda@synopsys.com>
* sysdeps/arc/dl-machine.h: Fix relocation.
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 9051ff17b19d..97e9bedabe0c 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -155,6 +155,9 @@ class Context(object):
'cfg': ['--disable-multi-arch']}])
self.add_config(arch='aarch64_be',
os_name='linux-gnu')
+ self.add_config(arch='arc',
+ os_name='linux-gnu',
+ gcc_cfg=['--disable-multilib', '--with-cpu=archs'])
self.add_config(arch='alpha',
os_name='linux-gnu')
self.add_config(arch='arm',
@@ -1258,6 +1261,7 @@ class Config(object):
def install_linux_headers(self, cmdlist):
"""Install Linux kernel headers."""
arch_map = {'aarch64': 'arm64',
+ 'arc': 'arc',
'alpha': 'alpha',
'arm': 'arm',
'hppa': 'parisc',
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 19/21] ARC: fix several unwining and cancelation tests
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (9 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 11/21] ARC: ABI lists Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 13/21] ARC: Build Infrastructure Vineet Gupta
` (12 subsequent siblings)
23 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Cupertino Miranda, Vineet Gupta
From: Cupertino Miranda <cmiranda@synopsys.com>
1. Add dwarf CFI psuedo-ops to various syscall generators
2. Signature of sa_restorer was not what libgcc trampoline parser
expects due to an intermediate mov instruction
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
---
ChangeLog | 8 ++++++++
sysdeps/arc/dl-trampoline.S | 9 +++++++++
sysdeps/arc/sysdep.h | 2 ++
sysdeps/unix/sysv/linux/arc/Makefile | 4 ++++
sysdeps/unix/sysv/linux/arc/Versions | 4 ++++
sysdeps/unix/sysv/linux/arc/sigaction.c | 8 +-------
sysdeps/unix/sysv/linux/arc/sigrestorer.S | 28 ++++++++++++++++++++++++++++
7 files changed, 56 insertions(+), 7 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/arc/sigrestorer.S
diff --git a/ChangeLog b/ChangeLog
index ec068c7c5925..376d0e401117 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
2018-12-17 Cupertino Miranda <cmiranda@synopsys.com>
* sysdeps/arc/dl-machine.h: Fix relocation.
+ * sysdeps/arc/dl-trampoline.S: Add cfi pseudo-ops.
+ * sysdeps/arc/sysdep.h: likewise.
+ * sysdeps/unix/sysv/linux/arc/sigrestorer.S: Add default sa_restorer
+ in asm.
+ * sysdeps/unix/sysv/linux/arc/sigaction.c: Delete "C" version of
+ restorer.
+ * sysdeps/unix/sysv/linux/arc/Makefile: Enable build.
+ * sysdeps/unix/sysv/linux/arc/Versions: expose default sa_restorer.
2018-12-17 Vineet Gupta <vgupta@synopsys.com>
diff --git a/sysdeps/arc/dl-trampoline.S b/sysdeps/arc/dl-trampoline.S
index c704f0ff9a95..0fc9786ec1d3 100644
--- a/sysdeps/arc/dl-trampoline.S
+++ b/sysdeps/arc/dl-trampoline.S
@@ -37,11 +37,16 @@
st.a r7, [sp, -4]
st.a r8, [sp, -4]
st.a r9, [sp, -4]
+ cfi_adjust_cfa_offset (40)
push_s blink
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (blink, 0)
.endm
.macro RESTORE_CALLER_SAVED_BUT_R0
ld.ab blink,[sp, 4]
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (blink)
ld.ab r9, [sp, 4]
ld.ab r8, [sp, 4]
ld.ab r7, [sp, 4]
@@ -51,6 +56,7 @@
pop_s r3
pop_s r2
pop_s r1
+ cfi_adjust_cfa_offset (-36)
.endm
; Upon entry, PLTn, which led us here, sets up the following regs
@@ -69,4 +75,7 @@ ENTRY(_dl_runtime_resolve)
RESTORE_CALLER_SAVED_BUT_R0
j_s.d [r0] ; r0 has resolved function addr
pop_s r0 ; restore first arg to resolved call
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (r0)
+
END(_dl_runtime_resolve)
diff --git a/sysdeps/arc/sysdep.h b/sysdeps/arc/sysdep.h
index 5c6e063d03fe..920611277089 100644
--- a/sysdeps/arc/sysdep.h
+++ b/sysdeps/arc/sysdep.h
@@ -32,10 +32,12 @@
.globl C_SYMBOL_NAME(name) ASM_LINE_SEP \
.type C_SYMBOL_NAME(name),%function ASM_LINE_SEP \
C_LABEL(name) ASM_LINE_SEP \
+ cfi_startproc ASM_LINE_SEP \
CALL_MCOUNT
#undef END
#define END(name) \
+ cfi_endproc ASM_LINE_SEP \
ASM_SIZE_DIRECTIVE(name)
#ifdef SHARED
diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile
index 76e5d24daea2..a6c6dfc6ec64 100644
--- a/sysdeps/unix/sysv/linux/arc/Makefile
+++ b/sysdeps/unix/sysv/linux/arc/Makefile
@@ -2,6 +2,10 @@ ifeq ($(subdir),stdlib)
gen-as-const-headers += ucontext_i.sym
endif
+ifeq ($(subdir),signal)
+sysdep_routines += sigrestorer
+endif
+
ifeq ($(subdir),misc)
# MIPS/Tile-style cacheflush routine
sysdep_headers += sys/cachectl.h
diff --git a/sysdeps/unix/sysv/linux/arc/Versions b/sysdeps/unix/sysv/linux/arc/Versions
index ac3327426360..3d12161f7fe2 100644
--- a/sysdeps/unix/sysv/linux/arc/Versions
+++ b/sysdeps/unix/sysv/linux/arc/Versions
@@ -9,4 +9,8 @@ libc {
_flush_cache;
cacheflush;
}
+ GLIBC_PRIVATE {
+ # A copy of sigaction lives in libpthread, and needs these.
+ __default_rt_sa_restorer;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c
index 0a58e78f8834..b437af677d58 100644
--- a/sysdeps/unix/sysv/linux/arc/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arc/sigaction.c
@@ -22,13 +22,7 @@
#include <string.h>
#include <sys/syscall.h>
-/*
- * Default sigretrun stub if user doesn't specify SA_RESTORER
- */
-static void __default_rt_sa_restorer(void)
-{
- INTERNAL_SYSCALL_NCS(__NR_rt_sigreturn, , 0);
-}
+extern void __default_rt_sa_restorer(void);
#define SA_RESTORER 0x04000000
diff --git a/sysdeps/unix/sysv/linux/arc/sigrestorer.S b/sysdeps/unix/sysv/linux/arc/sigrestorer.S
new file mode 100644
index 000000000000..d74cf0ec00e3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sigrestorer.S
@@ -0,0 +1,28 @@
+/* Default sigreturn stub for ARC Linux.
+ 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
+ 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 <sys/syscall.h>
+#include <sysdep.h>
+#include <tcb-offsets.h>
+
+ nop
+ENTRY(__default_rt_sa_restorer)
+ mov r8, __NR_rt_sigreturn
+ ARC_TRAP_INSN
+ j_s [blink]
+PSEUDO_END_NOERRNO(__default_rt_sa_restorer)
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (6 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 05/21] ARC: Thread Local Storage support Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 22:40 ` Andreas Schwab
2018-12-18 21:05 ` [PATCH 06/21] ARC: Atomics and Locking primitives Vineet Gupta
` (15 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Terminate the unwinding by telling unwinder to fetch return address
(BLINK) from r15 which has been set apriori to 0.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 2 ++
sysdeps/unix/sysv/linux/arc/makecontext.c | 1 +
sysdeps/unix/sysv/linux/arc/setcontext.S | 2 ++
3 files changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index d3a979a9236b..39ff298b0091 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -110,6 +110,8 @@
* sysdeps/arc/entry.h: Add ENTRY_POINT define check.
* sysdeps/arc/crti.S: add .hidden annotations.
* sysdeps/unix/sysv/linux/arc/ipc_priv.h: New file.
+ * sysdeps/unix/sysv/linux/arc/makecontext.c: clear r15.
+ * sysdeps/unix/sysv/linux/arc/setcontext.S: set blink from r15.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arc/makecontext.c b/sysdeps/unix/sysv/linux/arc/makecontext.c
index 7018bed9d64a..8d233f83da7e 100644
--- a/sysdeps/unix/sysv/linux/arc/makecontext.c
+++ b/sysdeps/unix/sysv/linux/arc/makecontext.c
@@ -45,6 +45,7 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
*/
ucp->uc_mcontext.callee.r13 = (unsigned long) func;
ucp->uc_mcontext.callee.r14 = (unsigned long) ucp->uc_link;
+ ucp->uc_mcontext.callee.r15 = 0;
r = &ucp->uc_mcontext.scratch.r0;
diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S b/sysdeps/unix/sysv/linux/arc/setcontext.S
index 3f503c661d95..6ec2ec0ddc79 100644
--- a/sysdeps/unix/sysv/linux/arc/setcontext.S
+++ b/sysdeps/unix/sysv/linux/arc/setcontext.S
@@ -79,6 +79,8 @@ weak_alias(__setcontext, setcontext)
ENTRY(__startcontext)
+ cfi_register (blink, r15)
+
/* call user @func, loaded in r13 by setcontext() */
jl [r13]
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 05/21] ARC: Thread Local Storage support
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (5 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 04/21] ARC: startup and dynamic linking code Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext Vineet Gupta
` (16 subsequent siblings)
23 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
This includes all 4 TLS addressing models
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 5 ++
sysdeps/arc/dl-tls.h | 30 ++++++++
sysdeps/arc/libc-tls.c | 27 +++++++
sysdeps/arc/nptl/tcb-offsets.sym | 11 +++
sysdeps/arc/nptl/tls.h | 150 +++++++++++++++++++++++++++++++++++++++
sysdeps/arc/stackinfo.h | 33 +++++++++
6 files changed, 256 insertions(+)
create mode 100644 sysdeps/arc/dl-tls.h
create mode 100644 sysdeps/arc/libc-tls.c
create mode 100644 sysdeps/arc/nptl/tcb-offsets.sym
create mode 100644 sysdeps/arc/nptl/tls.h
create mode 100644 sysdeps/arc/stackinfo.h
diff --git a/ChangeLog b/ChangeLog
index fd5602bde1a7..6e53b171a72d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,11 @@
* sysdeps/arc/sotruss-lib.c: New file.
* sysdeps/arc/start.S: New file.
* sysdeps/arc/tst-audit.h: New file.
+ * sysdeps/arc/dl-tls.h: New file.
+ * sysdeps/arc/libc-tls.c: New file.
+ * sysdeps/arc/nptl/tcb-offsets.sym: New file.
+ * sysdeps/arc/nptl/tls.h: New file.
+ * sysdeps/arc/stackinfo.h: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/dl-tls.h b/sysdeps/arc/dl-tls.h
new file mode 100644
index 000000000000..42b5df9ca4da
--- /dev/null
+++ b/sysdeps/arc/dl-tls.h
@@ -0,0 +1,30 @@
+/* Thread-local storage handling in the ELF dynamic linker. ARC version.
+ 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
+ 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/>. */
+
+
+/* Type used for the representation of TLS information in the GOT. */
+typedef struct
+{
+ unsigned long int ti_module;
+ unsigned long int ti_offset;
+} tls_index;
+
+extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/sysdeps/arc/libc-tls.c b/sysdeps/arc/libc-tls.c
new file mode 100644
index 000000000000..c6c865daac3e
--- /dev/null
+++ b/sysdeps/arc/libc-tls.c
@@ -0,0 +1,27 @@
+/* Thread-local storage handling in the ELF dynamic linker. ARC version.
+ 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
+ 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 <csu/libc-tls.c>
+#include <dl-tls.h>
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+ dtv_t *dtv = THREAD_DTV ();
+ return (char *) dtv[1].pointer.val + ti->ti_offset;
+}
diff --git a/sysdeps/arc/nptl/tcb-offsets.sym b/sysdeps/arc/nptl/tcb-offsets.sym
new file mode 100644
index 000000000000..56950e0676ed
--- /dev/null
+++ b/sysdeps/arc/nptl/tcb-offsets.sym
@@ -0,0 +1,11 @@
+#include <sysdep.h>
+#include <tls.h>
+
+-- Derive offsets relative to the thread register.
+#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
+
+MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
+TLS_PRE_TCB_SIZE sizeof (struct pthread)
+TLS_TCB_SIZE sizeof(tcbhead_t)
+
+PTHREAD_TID offsetof(struct pthread, tid)
diff --git a/sysdeps/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h
new file mode 100644
index 000000000000..b6c2023ef3f6
--- /dev/null
+++ b/sysdeps/arc/nptl/tls.h
@@ -0,0 +1,150 @@
+/* Definition for thread-local data handling. NPTL/ARC version.
+ 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
+ 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/>. */
+
+#ifndef _ARC_NPTL_TLS_H
+#define _ARC_NPTL_TLS_H 1
+
+#include <dl-sysdep.h>
+
+#ifndef __ASSEMBLER__
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdint.h>
+
+#include <dl-dtv.h>
+
+/* Get system call information. */
+# include <sysdep.h>
+
+/* The TLS blocks start right after the TCB. */
+# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
+
+typedef struct
+{
+ dtv_t *dtv;
+ uintptr_t pointer_guard;
+} tcbhead_t;
+
+register struct pthread *__thread_self __asm__("r25");
+
+/* This is the size of the initial TCB. */
+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+
+/* Alignment requirements for the initial TCB. */
+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
+
+/* This is the size of the TCB. */
+#ifndef TLS_TCB_SIZE
+# define TLS_TCB_SIZE sizeof (tcbhead_t)
+#endif
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
+
+/* This is the size we need before TCB. */
+# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
+
+/* Install the dtv pointer. The pointer passed is to the element with
+ index -1 which contain the length. */
+# define INSTALL_DTV(tcbp, dtvp) \
+ (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1)
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(dtv) \
+ (THREAD_DTV() = (dtv))
+
+/* Return dtv of given thread descriptor. */
+# define GET_DTV(tcbp) \
+ (((tcbhead_t *) (tcbp))->dtv)
+
+/* Code to initially initialize the thread pointer. */
+# define TLS_INIT_TP(tcbp) \
+ ({ \
+ long result_var; \
+ __builtin_set_thread_pointer(tcbp); \
+ result_var = INTERNAL_SYSCALL (arc_settls, err, 1, (tcbp)); \
+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ ? "unknown error" : NULL; \
+ })
+
+/* Value passed to 'clone' for initialization of the thread register. */
+# define TLS_DEFINE_INIT_TP(tp, pd) void *tp = (pd) + 1
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() \
+ (((tcbhead_t *) __builtin_thread_pointer ())->dtv)
+
+/* Return the thread descriptor for the current thread. */
+# define THREAD_SELF \
+ ((struct pthread *)__builtin_thread_pointer () - 1)
+
+/* Magic for libthread_db to know how to do THREAD_SELF. */
+# define DB_THREAD_SELF \
+ CONST_THREAD_AREA (32, sizeof (struct pthread))
+
+/* Access to data in the thread descriptor is easy. */
+# define THREAD_GETMEM(descr, member) \
+ descr->member
+# define THREAD_GETMEM_NC(descr, member, idx) \
+ descr->member[idx]
+# define THREAD_SETMEM(descr, member, value) \
+ descr->member = (value)
+# define THREAD_SETMEM_NC(descr, member, idx, value) \
+ descr->member[idx] = (value)
+
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_IN_TCB 1
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
+#else
+
+# include <tcb-offsets.h>
+
+# r25 is dedicated TLS register for ARC
+.macro THREAD_SELF reg
+ # struct pthread is just ahead of TCB
+ sub \reg, r25, TLS_PRE_TCB_SIZE
+.endm
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* tls.h */
diff --git a/sysdeps/arc/stackinfo.h b/sysdeps/arc/stackinfo.h
new file mode 100644
index 000000000000..42821ada1027
--- /dev/null
+++ b/sysdeps/arc/stackinfo.h
@@ -0,0 +1,33 @@
+/* Stack environment definitions for ARC.
+ 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
+ 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/>. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+#include <elf.h>
+
+/* On ARC the stack grows down. */
+#define _STACK_GROWS_DOWN 1
+
+/* Default to a non-executable stack. */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W)
+
+#endif /* stackinfo.h */
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 04/21] ARC: startup and dynamic linking code
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (4 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 23:31 ` Joseph Myers
2018-12-18 21:05 ` [PATCH 05/21] ARC: Thread Local Storage support Vineet Gupta
` (17 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Code for C runtime startup and dynamic loading including PLT layout.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 6 +
sysdeps/arc/bits/link.h | 52 ++++++++
sysdeps/arc/dl-machine.h | 333 ++++++++++++++++++++++++++++++++++++++++++++++
sysdeps/arc/ldsodefs.h | 43 ++++++
sysdeps/arc/sotruss-lib.c | 51 +++++++
sysdeps/arc/start.S | 81 +++++++++++
sysdeps/arc/tst-audit.h | 23 ++++
7 files changed, 589 insertions(+)
create mode 100644 sysdeps/arc/bits/link.h
create mode 100644 sysdeps/arc/dl-machine.h
create mode 100644 sysdeps/arc/ldsodefs.h
create mode 100644 sysdeps/arc/sotruss-lib.c
create mode 100644 sysdeps/arc/start.S
create mode 100644 sysdeps/arc/tst-audit.h
diff --git a/ChangeLog b/ChangeLog
index c2efdafa9861..fd5602bde1a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,12 @@
* sysdeps/arc/setjmp.S: New file.
* sysdeps/arc/sysdep.h: New file.
* sysdeps/arc/tls-macros.h: New file.
+ * sysdeps/arc/bits/link.h: New file.
+ * sysdeps/arc/dl-machine.h: New file.
+ * sysdeps/arc/ldsodefs.h: New file.
+ * sysdeps/arc/sotruss-lib.c: New file.
+ * sysdeps/arc/start.S: New file.
+ * sysdeps/arc/tst-audit.h: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/bits/link.h b/sysdeps/arc/bits/link.h
new file mode 100644
index 000000000000..1f4da2d9941c
--- /dev/null
+++ b/sysdeps/arc/bits/link.h
@@ -0,0 +1,52 @@
+/* Machine-specific declarations for dynamic linker interface, ARC version.
+ Copyright (C) 2009-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
+ 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/>. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+/* Registers for entry into PLT on ARC. */
+typedef struct La_arc_regs
+{
+ uint32_t lr_reg[8]; /* r0 through r7 (upto 8 args) */
+} La_arc_regs;
+
+/* Return values for calls from PLT on ARC. */
+typedef struct La_arc_retval
+{
+ /* For ARCv2, a 64-bit integer return value can use 2 regs */
+ uint32_t lrv_reg[2];
+} La_arc_retval;
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_arc_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_arc_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_arc_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_arc_regs *__inregs,
+ La_arc_retval *__outregs,
+ const char *symname);
+
+__END_DECLS
diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h
new file mode 100644
index 000000000000..da1aef79152d
--- /dev/null
+++ b/sysdeps/arc/dl-machine.h
@@ -0,0 +1,333 @@
+/* Machine-dependent ELF dynamic relocation inline functions. ARC version.
+ Copyright (C) 1995-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
+ 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/>. */
+
+#ifndef dl_machine_h
+#define dl_machine_h
+
+#define ELF_MACHINE_NAME "arc"
+
+#include <string.h>
+#include <link.h>
+#include <dl-tls.h>
+
+/*
+ * Dynamic Linking ABI for ARCv2 ISA
+ *
+ * PLT
+ * -------------------------------- <---- DT_PLTGOT
+ * | ld r11, [pcl, off-to-GOT[1] | 0
+ * | | 4
+ * plt0 | ld r10, [pcl, off-to-GOT[2] | 8
+ * | | 12
+ * | j [r10] | 16
+ * --------------------------------
+ * | Base address of GOT | 20
+ * --------------------------------
+ * | ld r12, [pcl, off-to-GOT[3] | 24
+ * plt1 | |
+ * | j.d [r12] | 32
+ * | mov r12, pcl | 36
+ * --------------------------------
+ * | | 40
+ * ~ ~
+ * ~ ~
+ * | |
+ * --------------------------------
+ *
+ * .got
+ * --------------
+ * | [0] |
+ * | ... | Runtime address for data symbols
+ * | [n] |
+ * --------------
+ *
+ * .got.plt
+ * --------------
+ * | [0] | Build address of .dynamic
+ * --------------
+ * | [1] | Module info - setup by ld.so
+ * --------------
+ * | [2] | resolver entry point
+ * --------------
+ * | [3] |
+ * | ... | Runtime address for function symbols
+ * | [f] |
+ * --------------
+ *
+ * For ARCompact, the PLT is 12 bytes due to short instructions
+ *
+ * --------------------------------
+ * | ld r12, [pcl, off-to-GOT[3] | 24 (12 bytes each)
+ * plt1 | |
+ * | j_s.d [r12] | 32
+ * | mov_s r12, pcl | 34
+ * --------------------------------
+ * | | 36
+ *
+ */
+
+/* Return nonzero iff ELF header is compatible with the running host. */
+static inline int
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
+{
+ return (ehdr->e_machine == EM_ARCV2 /* ARC HS */
+ || ehdr->e_machine == EM_ARC_COMPACT); /* ARC 700 */
+}
+
+/*
+ * Get build time address of .dynamic as setup in GOT[0]
+ * This is called very early in _dl_start() so it has not been relocated to
+ * runtime value
+ */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
+{
+ extern const Elf32_Addr _GLOBAL_OFFSET_TABLE_[] attribute_hidden;
+ return _GLOBAL_OFFSET_TABLE_[0];
+}
+
+
+/* Return the run-time load address of the shared object. */
+static inline Elf32_Addr
+elf_machine_load_address (void)
+{
+ Elf32_Addr build_addr, run_addr;
+
+ /* For build address, below generates
+ * ld r0, [pcl, _GLOBAL_OFFSET_TABLE_@pcl]
+ */
+ build_addr = elf_machine_dynamic();
+ __asm__ ("add %0, pcl, _DYNAMIC@pcl \n" : "=r" (run_addr));
+
+ return run_addr - build_addr;
+}
+
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline int __attribute__ ((always_inline))
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+ extern void _dl_runtime_resolve (Elf32_Word);
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ /* On ARC DT_PLTGOT point to .plt whose 5th word (after the PLT header)
+ * contains the address of .got */
+ Elf32_Addr *plt_base = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
+ Elf32_Addr *got = (Elf32_Addr *) (plt_base[5] + l->l_addr);
+
+ got[1] = (Elf32_Addr) l; /* Identify this shared object. */
+
+ /* This function will get called to fix up the GOT entry indicated by
+ the offset on the stack, and then jump to the resolved address. */
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+ }
+
+ return lazy;
+}
+
+/* What this code does:
+ -ldso starts execution here when kernel returns from execve()
+ -calls into generic ldso entry point _dl_start( )
+ -optionally adjusts argc for executable if exec passed as cmd
+ -calls into app main with address of finaliser */
+
+#define RTLD_START asm ("\
+.text \n\
+.globl _start \n\
+.type _start, @function \n\
+_start: \n\
+ ; (1). bootstrap ld.so \n\
+ bl.d _dl_start \n\
+ mov_s r0, sp ; pass ptr to aux vector tbl \n\
+ mov r13, r0 ; safekeep app elf entry point \n\
+ \n\
+ ; (2). If ldso ran with executable as arg \n\
+ ; skip the extra args calc by dl_start() \n\
+ ld_s r1, [sp] ; orig argc \n\
+ ld r12, [pcl, _dl_skip_args@pcl] \n\
+ breq r12, 0, 1f \n\
+ \n\
+ add2 sp, sp, r12 ; discard argv entries from stack\n\
+ sub_s r1, r1, r12 ; adjusted argc, on stack \n\
+ st_s r1, [sp] \n\
+ add r2, sp, 4 \n\
+ ld r3, [pcl, _dl_argv@gotpc] ; ST doesn't support this addressing mode \n\
+ st r2, [r3] \n\
+1: \n\
+ ; (3). call preinit stuff \n\
+ ld r0, [pcl, _rtld_local@pcl] \n\
+ add r2, sp, 4 ; argv \n\
+ add2 r3, r2, r1 \n\
+ add r3, r3, 4 ; env \n\
+ bl _dl_init@plt \n\
+ \n\
+ ; (4) call app elf entry point \n\
+ add r0, pcl, _dl_fini@pcl \n\
+ j [r13] \n\
+ \n\
+ .size _start,.-_start \n\
+ .previous \n\
+");
+
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_ARC_JUMP_SLOT \
+ || (type) == R_ARC_TLS_DTPMOD \
+ || (type) == R_ARC_TLS_DTPOFF \
+ || (type) == R_ARC_TLS_TPOFF) * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_ARC_COPY) * ELF_RTYPE_CLASS_COPY))
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
+#define ELF_MACHINE_JMP_SLOT R_ARC_JUMP_SLOT
+
+/* ARC uses Elf32_Rela relocations. */
+#define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
+
+/* Fixup a PLT entry to bounce directly to the function at VALUE. */
+
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
+ const Elf32_Rela *reloc,
+ Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+ return *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation. */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+ Elf32_Addr value)
+{
+ return value;
+}
+
+/* Names of the architecture-specific auditing callback functions. */
+#define ARCH_LA_PLTENTER arc_gnu_pltenter
+#define ARCH_LA_PLTEXIT arc_gnu_pltexit
+
+#endif /* dl_machine_h */
+
+#ifdef RESOLVE_MAP
+
+auto inline void __attribute__ ((always_inline))
+elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
+ const ElfW(Sym) *sym, const struct r_found_version *version,
+ void *const reloc_addr_arg, int skip_ifunc)
+{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+
+ if (__glibc_unlikely (r_type == R_ARC_RELATIVE))
+ *reloc_addr += map->l_addr;
+ else if (__glibc_unlikely (r_type == R_ARC_NONE))
+ return;
+ else
+ {
+ const Elf32_Sym *const refsym = sym;
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ Elf32_Addr value = SYMBOL_ADDRESS (sym_map, sym, true);
+
+ switch (r_type)
+ {
+ case R_ARC_COPY:
+ if (sym == NULL)
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
+ if (sym->st_size > refsym->st_size
+ || (sym->st_size < refsym->st_size && GLRO(dl_verbose)))
+ {
+ const char *strtab;
+
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ rtld_progname ?: "<program name unknown>",
+ strtab + refsym->st_name);
+ }
+ memcpy (reloc_addr_arg, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
+ break;
+ case R_ARC_GLOB_DAT:
+ case R_ARC_JUMP_SLOT:
+ *reloc_addr = value;
+ break;
+ case R_ARC_TLS_DTPMOD:
+ /* Get the information from the link map returned by the
+ resolv function. */
+ if (sym_map != NULL)
+ *reloc_addr = sym_map->l_tls_modid;
+ break;
+
+ case R_ARC_TLS_DTPOFF:
+ if (sym != NULL)
+ {
+ *reloc_addr = sym->st_value;
+ }
+ break;
+
+ case R_ARC_TLS_TPOFF:
+ if (sym != NULL)
+ {
+ CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr = sym_map->l_tls_offset + sym->st_value + reloc->r_addend;
+ }
+ break;
+ case R_ARC_32:
+ *reloc_addr += value + reloc->r_addend;
+ break;
+
+ case R_ARC_PC32:
+ *reloc_addr += value + reloc->r_addend - (unsigned long) reloc_addr;
+ break;
+
+ default:
+ _dl_reloc_bad_type (map, r_type, 0);
+ break;
+ }
+ }
+}
+
+auto inline void __attribute__((always_inline))
+elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
+ void *const reloc_addr_arg)
+{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
+ *reloc_addr += l_addr; // + reloc->r_addend;
+}
+
+auto inline void __attribute__((always_inline))
+elf_machine_lazy_rel (struct link_map *map,
+ ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
+ int skip_ifunc)
+{
+ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+ if (ELF32_R_TYPE (reloc->r_info) == R_ARC_JUMP_SLOT)
+ *reloc_addr += l_addr;
+ else
+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
+}
+
+#endif /* RESOLVE_MAP */
diff --git a/sysdeps/arc/ldsodefs.h b/sysdeps/arc/ldsodefs.h
new file mode 100644
index 000000000000..3fafc683da2e
--- /dev/null
+++ b/sysdeps/arc/ldsodefs.h
@@ -0,0 +1,43 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+ 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
+ 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/>. */
+
+#ifndef _ARC_LDSODEFS_H
+#define _ARC_LDSODEFS_H 1
+
+#include <elf.h>
+
+struct La_arc_regs;
+struct La_arc_retval;
+
+#define ARCH_PLTENTER_MEMBERS \
+ ElfW(Addr) (*arc_gnu_pltenter) (ElfW(Sym) *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_arc_regs *, \
+ unsigned int *, const char *, \
+ long int *);
+
+#define ARCH_PLTEXIT_MEMBERS \
+ unsigned int (*arc_gnu_pltexit) (ElfW(Sym) *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_arc_regs *, \
+ struct La_arc_retval *, \
+ const char *);
+
+#include_next <ldsodefs.h>
+
+#endif
diff --git a/sysdeps/arc/sotruss-lib.c b/sysdeps/arc/sotruss-lib.c
new file mode 100644
index 000000000000..fc6a009e913a
--- /dev/null
+++ b/sysdeps/arc/sotruss-lib.c
@@ -0,0 +1,51 @@
+/* Override generic sotruss-lib.c to define actual functions for ARC.
+ 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
+ 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/>. */
+
+#define HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+ElfW(Addr)
+la_arc_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_arc_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+ *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_arc_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_arc_regs *inregs,
+ struct La_arc_retval *outregs, const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_reg[0]);
+
+ return 0;
+}
diff --git a/sysdeps/arc/start.S b/sysdeps/arc/start.S
new file mode 100644
index 000000000000..119d596db07f
--- /dev/null
+++ b/sysdeps/arc/start.S
@@ -0,0 +1,81 @@
+/* Startup code for ARC
+ Copyright (C) 1995-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
+ 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.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ 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/>. */
+
+
+/* When we enter this piece of code, the program stack looks like this:
+ argc argument counter (integer)
+ argv[0] program name (pointer)
+ argv[1...N] program args (pointers)
+ argv[argc-1] end of args (integer)
+ NULL
+ env[0...N] environment variables (pointers)
+ NULL
+*/
+ .text
+ .align 4
+ .global _start
+ .type _start,@function
+_start:
+ mov fp, 0
+ ld_s r1, [sp] ; argc
+
+ mov_s r5, r0 ; rltd_fini
+ add_s r2, sp, 4 ; argv
+ and sp, sp, -8
+ mov r6, sp
+
+#ifdef SHARED
+ ld r0, [pcl, @main@gotpc]
+ ld r3, [pcl, @__libc_csu_init@gotpc]
+ ld r4, [pcl, @__libc_csu_fini@gotpc]
+ bl __libc_start_main@plt
+#else
+ mov_s r0, main
+ mov_s r3, __libc_csu_init
+ mov r4, __libc_csu_fini
+ bl __libc_start_main
+#endif
+ /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
+
+ /* Should never get here.... */
+ flag 1
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
diff --git a/sysdeps/arc/tst-audit.h b/sysdeps/arc/tst-audit.h
new file mode 100644
index 000000000000..8ae3734cd50c
--- /dev/null
+++ b/sysdeps/arc/tst-audit.h
@@ -0,0 +1,23 @@
+/* Definitions for testing PLT entry/exit auditing. ARC version.
+ Copyright (C) 2009-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
+ 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/>. */
+
+#define pltenter la_arc_gnu_pltenter
+#define pltexit la_arc_gnu_pltexit
+#define La_regs La_arc_regs
+#define La_retval La_arc_retval
+#define int_retval lrv_reg[0]
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 09/21] ARC: Linux ABI
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (15 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 23:44 ` Joseph Myers
2018-12-18 21:05 ` [PATCH 07/21] ARC: math soft float support Vineet Gupta
` (6 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 15 +++++
sysdeps/arc/nptl/pthread-offsets.h | 5 ++
sysdeps/arc/nptl/pthreaddef.h | 32 +++++++++
sysdeps/unix/sysv/linux/arc/bits/procfs-id.h | 25 +++++++
sysdeps/unix/sysv/linux/arc/bits/procfs.h | 35 ++++++++++
sysdeps/unix/sysv/linux/arc/bits/sigaction.h | 85 ++++++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/getcontext.S | 65 +++++++++++++++++++
sysdeps/unix/sysv/linux/arc/makecontext.c | 74 +++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/setcontext.S | 93 +++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/sigcontextinfo.h | 23 +++++++
sysdeps/unix/sysv/linux/arc/swapcontext.S | 92 ++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/sys/cachectl.h | 36 +++++++++++
sysdeps/unix/sysv/linux/arc/sys/ucontext.h | 71 ++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/sys/user.h | 32 +++++++++
sysdeps/unix/sysv/linux/arc/ucontext-macros.h | 29 +++++++++
sysdeps/unix/sysv/linux/arc/ucontext_i.sym | 20 ++++++
16 files changed, 732 insertions(+)
create mode 100644 sysdeps/arc/nptl/pthread-offsets.h
create mode 100644 sysdeps/arc/nptl/pthreaddef.h
create mode 100644 sysdeps/unix/sysv/linux/arc/bits/procfs-id.h
create mode 100644 sysdeps/unix/sysv/linux/arc/bits/procfs.h
create mode 100644 sysdeps/unix/sysv/linux/arc/bits/sigaction.h
create mode 100644 sysdeps/unix/sysv/linux/arc/getcontext.S
create mode 100644 sysdeps/unix/sysv/linux/arc/makecontext.c
create mode 100644 sysdeps/unix/sysv/linux/arc/setcontext.S
create mode 100644 sysdeps/unix/sysv/linux/arc/sigcontextinfo.h
create mode 100644 sysdeps/unix/sysv/linux/arc/swapcontext.S
create mode 100644 sysdeps/unix/sysv/linux/arc/sys/cachectl.h
create mode 100644 sysdeps/unix/sysv/linux/arc/sys/ucontext.h
create mode 100644 sysdeps/unix/sysv/linux/arc/sys/user.h
create mode 100644 sysdeps/unix/sysv/linux/arc/ucontext-macros.h
create mode 100644 sysdeps/unix/sysv/linux/arc/ucontext_i.sym
diff --git a/ChangeLog b/ChangeLog
index 08a3ac7e8064..ca010c356597 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,21 @@
* sysdeps/unix/sysv/linux/arc/sysdep.c: New file.
* sysdeps/unix/sysv/linux/arc/sysdep.h: New file.
* sysdeps/unix/sysv/linux/arc/vfork.S: New file.
+ * sysdeps/arc/nptl/pthread-offsets.h: New file.
+ * sysdeps/arc/nptl/pthreaddef.h: New file.
+ * sysdeps/unix/sysv/linux/arc/bits/procfs-id.h: New file.
+ * sysdeps/unix/sysv/linux/arc/bits/procfs.h: New file.
+ * sysdeps/unix/sysv/linux/arc/bits/sigaction.h: New file.
+ * sysdeps/unix/sysv/linux/arc/getcontext.S: New file.
+ * sysdeps/unix/sysv/linux/arc/makecontext.c: New file.
+ * sysdeps/unix/sysv/linux/arc/setcontext.S: New file.
+ * sysdeps/unix/sysv/linux/arc/sigcontextinfo.h: New file.
+ * sysdeps/unix/sysv/linux/arc/swapcontext.S: New file.
+ * sysdeps/unix/sysv/linux/arc/sys/cachectl.h: New file.
+ * sysdeps/unix/sysv/linux/arc/sys/ucontext.h: New file.
+ * sysdeps/unix/sysv/linux/arc/sys/user.h: New file.
+ * sysdeps/unix/sysv/linux/arc/ucontext-macros.h: New file.
+ * sysdeps/unix/sysv/linux/arc/ucontext_i.sym: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/nptl/pthread-offsets.h b/sysdeps/arc/nptl/pthread-offsets.h
new file mode 100644
index 000000000000..9617354dc7e3
--- /dev/null
+++ b/sysdeps/arc/nptl/pthread-offsets.h
@@ -0,0 +1,5 @@
+#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
+#define __PTHREAD_MUTEX_KIND_OFFSET 12
+#define __PTHREAD_MUTEX_SPINS_OFFSET 20
+#define __PTHREAD_MUTEX_ELISION_OFFSET 22
+#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/arc/nptl/pthreaddef.h b/sysdeps/arc/nptl/pthreaddef.h
new file mode 100644
index 000000000000..41e13c53038c
--- /dev/null
+++ b/sysdeps/arc/nptl/pthreaddef.h
@@ -0,0 +1,32 @@
+/* pthread machine parameter definitions, ARC version.
+ Copyright (C) 2002-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
+ 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/>. */
+
+/* Default stack size. */
+#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
+
+/* Required stack pointer alignment at beginning. */
+#define STACK_ALIGN 4
+
+/* Minimal stack size after allocating thread descriptor and guard size. */
+#define MINIMAL_REST_STACK 2048
+
+/* Alignment requirement for TCB. */
+#define TCB_ALIGNMENT 4
+
+/* Location of current stack frame. */
+#define CURRENT_STACK_FRAME __builtin_frame_address (0)
diff --git a/sysdeps/unix/sysv/linux/arc/bits/procfs-id.h b/sysdeps/unix/sysv/linux/arc/bits/procfs-id.h
new file mode 100644
index 000000000000..d0192fcbc36e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/bits/procfs-id.h
@@ -0,0 +1,25 @@
+/* Types of pr_uid and pr_gid in struct elf_prpsinfo. ARC version.
+ Copyright (C) 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
+ 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/>. */
+
+#ifndef _SYS_PROCFS_H
+# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
+#endif
+
+typedef unsigned short int __pr_uid_t;
+typedef unsigned short int __pr_gid_t;
diff --git a/sysdeps/unix/sysv/linux/arc/bits/procfs.h b/sysdeps/unix/sysv/linux/arc/bits/procfs.h
new file mode 100644
index 000000000000..a3315beddb37
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/bits/procfs.h
@@ -0,0 +1,35 @@
+/* Types for registers for sys/procfs.h. ARC version.
+ 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
+ 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/>. */
+
+#ifndef _SYS_PROCFS_H
+# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
+#endif
+
+#include <sys/ucontext.h>
+
+/* And the whole bunch of them. We could have used `struct
+ user_regs' directly in the typedef, but tradition says that
+ the register set is an array, which does have some peculiar
+ semantics, so leave it that way. */
+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
+
+typedef unsigned long int elf_greg_t;
+typedef unsigned long int elf_gregset_t[ELF_NGREG];
+
+/* There's no seperate floating point reg file in ARCv2 */
+typedef struct { } elf_fpregset_t;
diff --git a/sysdeps/unix/sysv/linux/arc/bits/sigaction.h b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h
new file mode 100644
index 000000000000..47e86c06ce98
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h
@@ -0,0 +1,85 @@
+/* The proper definitions for Linux's sigaction.
+ Copyright (C) 1993-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
+ 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/>. */
+
+#ifndef _BITS_SIGACTION_H
+#define _BITS_SIGACTION_H 1
+
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
+/* Structure describing the action to be taken when a signal arrives.
+ * The generic struct is NOT ABI compatible with asm-generic Linux syscall variant*/
+
+struct sigaction
+ {
+ /* Signal handler. */
+#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
+ __sighandler_t sa_handler;
+#endif
+
+ /* Special flags. */
+ int sa_flags;
+
+ /* Restore handler. */
+ void (*sa_restorer) (void);
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */
+#define SA_SIGINFO 4 /* Invoke signal-catching function with
+ three arguments instead of one. */
+#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
+# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+ its handler is being executed. */
+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+#endif
+#ifdef __USE_MISC
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+
+/* Some aliases for the SA_ constants. */
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 0 /* Block signals. */
+#define SIG_UNBLOCK 1 /* Unblock signals. */
+#define SIG_SETMASK 2 /* Set the set of blocked signals. */
+
+#endif
\ No newline at end of file
diff --git a/sysdeps/unix/sysv/linux/arc/getcontext.S b/sysdeps/unix/sysv/linux/arc/getcontext.S
new file mode 100644
index 000000000000..af31f581e846
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/getcontext.S
@@ -0,0 +1,65 @@
+/* Save current context for ARC
+ Copyright (C) 2009-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
+ 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 "ucontext-macros.h"
+
+/* int getcontext (ucontext_t *ucp)
+
+ Save machine context in @ucp and return 0 on success, -1 on error
+ - saves callee saved registers only
+ - layout mandated by uncontext_t:m_context (hence different from setjmp)
+*/
+
+ENTRY(__getcontext)
+
+ /* callee saved registers */
+ SAVE_REG(r13, r0, 37)
+ SAVE_REG(r14, r0, 36)
+ SAVE_REG(r15, r0, 35)
+ SAVE_REG(r16, r0, 34)
+ SAVE_REG(r17, r0, 33)
+ SAVE_REG(r18, r0, 32)
+ SAVE_REG(r19, r0, 31)
+ SAVE_REG(r20, r0, 30)
+ SAVE_REG(r21, r0, 29)
+ SAVE_REG(r22, r0, 28)
+ SAVE_REG(r23, r0, 27)
+ SAVE_REG(r24, r0, 26)
+ SAVE_REG(r25, r0, 25)
+
+ SAVE_REG(blink, r0, 7)
+ SAVE_REG(fp, r0, 8)
+ SAVE_REG(sp, r0, 23)
+
+ /* save 0 in r0 placeholder to return 0 when this @ucp activated */
+ mov r9, 0
+ SAVE_REG(r9, r0, 22)
+
+ /* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */
+ mov r3, _NSIG8
+ add r2, r0, UCONTEXT_SIGMASK
+ mov r1, 0
+ mov r0, SIG_BLOCK
+ mov r8, __NR_rt_sigprocmask
+ ARC_TRAP_INSN
+ brhi r0, -1024, .Lcall_syscall_err
+ j.d [blink]
+ mov r0, 0 ; success ; error case handled in .Lcall_syscall_err
+
+PSEUDO_END(__getcontext)
+weak_alias(__getcontext, getcontext)
diff --git a/sysdeps/unix/sysv/linux/arc/makecontext.c b/sysdeps/unix/sysv/linux/arc/makecontext.c
new file mode 100644
index 000000000000..7018bed9d64a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/makecontext.c
@@ -0,0 +1,74 @@
+/* Create new context for ARC
+ 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
+ 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 <stdarg.h>
+#include <stdint.h>
+#include <sys/ucontext.h>
+
+void
+__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
+{
+ extern void __startcontext (void) attribute_hidden;
+ unsigned long sp, *r;
+ va_list vl;
+ int i, reg_args, stack_args;
+
+ sp = ((unsigned long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ~7;
+
+ ucp->uc_mcontext.scratch.sp = sp;
+ ucp->uc_mcontext.scratch.fp = 0;
+
+ /* __startcontext is sort of trampoline to invoke @func
+ * From setcontext() pov, the resume address is __startcontext,
+ * set it up in BLINK place holder*/
+ ucp->uc_mcontext.scratch.blink = (unsigned long) &__startcontext;
+
+ /* __startcontext passed 2 types of args
+ * - args to @func setup in canonical r0-r7
+ * - @func itself in r9, and next function in r10
+ */
+ ucp->uc_mcontext.callee.r13 = (unsigned long) func;
+ ucp->uc_mcontext.callee.r14 = (unsigned long) ucp->uc_link;
+
+ r = &ucp->uc_mcontext.scratch.r0;
+
+ va_start (vl, argc);
+
+ reg_args = argc > 8 ? 8 : argc;
+ for (i = 0; i < reg_args; i++) {
+ *r-- = va_arg(vl, unsigned long);
+ }
+
+ stack_args = argc - reg_args;
+
+ if (__glibc_unlikely(stack_args > 0)) {
+
+ sp -= stack_args * sizeof (unsigned long);
+ ucp->uc_mcontext.scratch.sp = sp;
+ r = (unsigned long *)sp;
+
+ for (i = 0; i < stack_args; i++) {
+ *r++ = va_arg(vl, unsigned long);
+ }
+ }
+
+ va_end (vl);
+}
+
+weak_alias (__makecontext, makecontext)
diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S b/sysdeps/unix/sysv/linux/arc/setcontext.S
new file mode 100644
index 000000000000..3f503c661d95
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/setcontext.S
@@ -0,0 +1,93 @@
+/* Set current context for ARC
+ Copyright (C) 2009-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
+ 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 "ucontext-macros.h"
+
+/*
+ int setcontext (const ucontext_t *ucp)
+ - Restores the machine context in @ucp and resumes execution
+ (doesn't return to caller)
+*/
+
+ENTRY(__setcontext)
+
+ mov r9, r0 /* stash @ucp across syscall */
+
+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */
+ mov r3, _NSIG8
+ mov r2, 0
+ add r1, r0, UCONTEXT_SIGMASK
+ mov r0, SIG_SETMASK
+ mov r8, __NR_rt_sigprocmask
+ ARC_TRAP_INSN
+ brhi r0, -1024, .Lcall_syscall_err
+
+ /* restore scratch/arg regs for makecontext() case */
+ LOAD_REG(r0, r9, 22)
+ LOAD_REG(r1, r9, 21)
+ LOAD_REG(r2, r9, 20)
+ LOAD_REG(r3, r9, 19)
+ LOAD_REG(r4, r9, 18)
+ LOAD_REG(r5, r9, 17)
+ LOAD_REG(r6, r9, 16)
+ LOAD_REG(r7, r9, 15)
+
+ /* restore callee saved registers */
+ LOAD_REG(r13, r9, 37)
+ LOAD_REG(r14, r9, 36)
+ LOAD_REG(r15, r9, 35)
+ LOAD_REG(r16, r9, 34)
+ LOAD_REG(r17, r9, 33)
+ LOAD_REG(r18, r9, 32)
+ LOAD_REG(r19, r9, 31)
+ LOAD_REG(r20, r9, 30)
+ LOAD_REG(r21, r9, 29)
+ LOAD_REG(r22, r9, 28)
+ LOAD_REG(r23, r9, 27)
+ LOAD_REG(r24, r9, 26)
+ LOAD_REG(r25, r9, 25)
+
+ LOAD_REG(blink, r9, 7)
+ LOAD_REG(fp, r9, 8)
+ LOAD_REG(sp, r9, 23)
+
+ j [blink]
+
+PSEUDO_END(__setcontext)
+weak_alias(__setcontext, setcontext)
+
+
+/*
+ Helper for activating makecontext() created context
+ - r13 has @func, r14 has uc_link
+*/
+
+ENTRY(__startcontext)
+
+ /* call user @func, loaded in r13 by setcontext() */
+ jl [r13]
+
+ /* if uc_link (r14) call setcontext with that */
+ mov r0, r14
+ breq r0, 0, 1f
+
+ bl __setcontext
+1:
+ /* exit with status 0 */
+ b HIDDEN_JUMPTARGET(exit)
+END(__startcontext)
diff --git a/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h
new file mode 100644
index 000000000000..852bbd96d47f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h
@@ -0,0 +1,23 @@
+/* ARC definitions for signal handling calling conventions.
+ 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
+ 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 <sys/ucontext.h>
+#include "kernel-features.h"
+
+#define SIGCONTEXT int _code, struct ucontext_t *
+#define GET_PC(ctx) ((void *) (ctx)->uc_mcontext.scratch.ret)
diff --git a/sysdeps/unix/sysv/linux/arc/swapcontext.S b/sysdeps/unix/sysv/linux/arc/swapcontext.S
new file mode 100644
index 000000000000..ad6bf70ab5e2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/swapcontext.S
@@ -0,0 +1,92 @@
+/* Save and set current context for ARC
+ Copyright (C) 2009-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
+ 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 "ucontext-macros.h"
+
+/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
+
+ENTRY(__swapcontext)
+
+ /* save context into @oucp pointed to by r0 */
+
+ SAVE_REG(r13, r0, 37)
+ SAVE_REG(r14, r0, 36)
+ SAVE_REG(r15, r0, 35)
+ SAVE_REG(r16, r0, 34)
+ SAVE_REG(r17, r0, 33)
+ SAVE_REG(r18, r0, 32)
+ SAVE_REG(r19, r0, 31)
+ SAVE_REG(r20, r0, 30)
+ SAVE_REG(r21, r0, 29)
+ SAVE_REG(r22, r0, 28)
+ SAVE_REG(r23, r0, 27)
+ SAVE_REG(r24, r0, 26)
+ SAVE_REG(r25, r0, 25)
+
+ SAVE_REG(blink, r0, 7)
+ SAVE_REG(fp, r0, 8)
+ SAVE_REG(sp, r0, 23)
+
+ /* save 0 in r0 placeholder to return 0 when @oucp activated */
+ mov r9, 0
+ SAVE_REG(r9, r0, 22)
+
+ /* load context from @ucp */
+
+ mov r9, r1 ; safekeep @ucp across syscall
+
+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */
+ mov r3, _NSIG8
+ add r2, r0, UCONTEXT_SIGMASK
+ add r1, r1, UCONTEXT_SIGMASK
+ mov r0, SIG_SETMASK
+ mov r8, __NR_rt_sigprocmask
+ ARC_TRAP_INSN
+ brhi r0, -1024, .Lcall_syscall_err
+
+ LOAD_REG(r0, r9, 22)
+ LOAD_REG(r1, r9, 21)
+ LOAD_REG(r2, r9, 20)
+ LOAD_REG(r3, r9, 19)
+ LOAD_REG(r4, r9, 18)
+ LOAD_REG(r5, r9, 17)
+ LOAD_REG(r6, r9, 16)
+ LOAD_REG(r7, r9, 15)
+
+ LOAD_REG(r13, r9, 37)
+ LOAD_REG(r14, r9, 36)
+ LOAD_REG(r15, r9, 35)
+ LOAD_REG(r16, r9, 34)
+ LOAD_REG(r17, r9, 33)
+ LOAD_REG(r18, r9, 32)
+ LOAD_REG(r19, r9, 31)
+ LOAD_REG(r20, r9, 30)
+ LOAD_REG(r21, r9, 29)
+ LOAD_REG(r22, r9, 28)
+ LOAD_REG(r23, r9, 27)
+ LOAD_REG(r24, r9, 26)
+ LOAD_REG(r25, r9, 25)
+
+ LOAD_REG(blink, r9, 7)
+ LOAD_REG(fp, r9, 8)
+ LOAD_REG(sp, r9, 23)
+
+ j [blink]
+
+PSEUDO_END(__swapcontext)
+weak_alias(__swapcontext, swapcontext)
diff --git a/sysdeps/unix/sysv/linux/arc/sys/cachectl.h b/sysdeps/unix/sysv/linux/arc/sys/cachectl.h
new file mode 100644
index 000000000000..c2ba820e50b7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sys/cachectl.h
@@ -0,0 +1,36 @@
+/* cacheflush - flush contents of instruction and/or data cache.
+ 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
+ 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/>. */
+
+#ifndef _SYS_CACHECTL_H
+#define _SYS_CACHECTL_H 1
+
+#include <features.h>
+
+/* Get the kernel definition for the op bits. */
+#include <asm/cachectl.h>
+
+__BEGIN_DECLS
+
+#ifdef __USE_MISC
+extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
+#endif
+extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW;
+
+__END_DECLS
+
+#endif /* sys/cachectl.h */
diff --git a/sysdeps/unix/sysv/linux/arc/sys/ucontext.h b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h
new file mode 100644
index 000000000000..e91abc3d9fba
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h
@@ -0,0 +1,71 @@
+/* struct ucontext definition, ARC 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
+ 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/>. */
+
+/* System V/ARC ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+
+#include <bits/types/sigset_t.h>
+#include <bits/types/stack_t.h>
+
+#ifdef __USE_MISC
+# define __ctx(fld) fld
+#else
+# define __ctx(fld) __ ## fld
+#endif
+
+typedef struct
+ {
+ unsigned long __ctx(pad);
+ struct {
+ unsigned long __ctx(bta);
+ unsigned long __ctx(lp_start), __ctx(lp_end), __ctx(lp_count);
+ unsigned long __ctx(status32), __ctx(ret), __ctx(blink);
+ unsigned long __ctx(fp), __ctx(gp);
+ unsigned long __ctx(r12), __ctx(r11), __ctx(r10), __ctx(r9), __ctx(r8);
+ unsigned long __ctx(r7), __ctx(r6), __ctx(r5), __ctx(r4), __ctx(r3);
+ unsigned long __ctx(r2), __ctx(r1), __ctx(r0);
+ unsigned long __ctx(sp);
+ } __ctx(scratch);
+ unsigned long __ctx(pad2);
+ struct {
+ unsigned long __ctx(r25), __ctx(r24), __ctx(r23), __ctx(r22), __ctx(r21);
+ unsigned long __ctx(r20), __ctx(r19), __ctx(r18), __ctx(r17), __ctx(r16);
+ unsigned long __ctx(r15), __ctx(r14), __ctx(r13);
+ } __ctx(callee);
+ unsigned long __ctx(efa);
+ unsigned long __ctx(stop_pc);
+ unsigned long __ctx(r30), __ctx(r58), __ctx(r59);
+ } mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext_t
+ {
+ unsigned long __ctx(uc_flags);
+ struct ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ sigset_t uc_sigmask;
+ } ucontext_t;
+
+#undef __ctx
+
+#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/arc/sys/user.h b/sysdeps/unix/sysv/linux/arc/sys/user.h
new file mode 100644
index 000000000000..1f7129799bf6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sys/user.h
@@ -0,0 +1,32 @@
+/* ptrace register data format definitions.
+ 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
+ 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/>. */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H 1
+
+/* struct user_regs_struct is exported by kernel header
+ * However apps like strace also expect a struct user, so it's better to
+ * have a dummy implementation
+ */
+#include <asm/ptrace.h>
+
+struct user {
+ int dummy;
+};
+
+#endif /* sys/user.h */
diff --git a/sysdeps/unix/sysv/linux/arc/ucontext-macros.h b/sysdeps/unix/sysv/linux/arc/ucontext-macros.h
new file mode 100644
index 000000000000..a5d861476f3c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/ucontext-macros.h
@@ -0,0 +1,29 @@
+/* Macros for ucontext routines - ARC
+ 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
+ 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/>. */
+
+#ifndef _LINUX_ARC_UCONTEXT_MACROS_H
+#define _LINUX_ARC_UCONTEXT_MACROS_H
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+#define SAVE_REG(reg, rbase, off) st reg, [rbase, UCONTEXT_MCONTEXT + off * 4]
+#define LOAD_REG(reg, rbase, off) ld reg, [rbase, UCONTEXT_MCONTEXT + off * 4]
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arc/ucontext_i.sym b/sysdeps/unix/sysv/linux/arc/ucontext_i.sym
new file mode 100644
index 000000000000..f0a209e581ab
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/ucontext_i.sym
@@ -0,0 +1,20 @@
+#include <inttypes.h>
+#include <signal.h>
+#include <stddef.h>
+#include <sys/ucontext.h>
+
+SIG_BLOCK
+SIG_SETMASK
+
+-- sizeof(sigset_t) expected by kernel: see comment in ARC sigaction.c for details
+_NSIG8 (_NSIG / 8)
+
+-- Offsets of the fields in the ucontext_t structure.
+#define ucontext(member) offsetof (ucontext_t, member)
+
+UCONTEXT_FLAGS ucontext (uc_flags)
+UCONTEXT_LINK ucontext (uc_link)
+UCONTEXT_STACK ucontext (uc_stack)
+UCONTEXT_MCONTEXT ucontext (uc_mcontext)
+UCONTEXT_SIGMASK ucontext (uc_sigmask)
+UCONTEXT_SIZE sizeof (ucontext_t)
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 21/21] NEWS: mention ARC port
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (11 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 13/21] ARC: Build Infrastructure Vineet Gupta
@ 2018-12-18 21:05 ` Vineet Gupta
2018-12-18 23:49 ` Joseph Myers
2018-12-18 21:05 ` [PATCH 02/21] ARC: add definitions to elf/elf.h Vineet Gupta
` (10 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:05 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 1 +
NEWS | 2 ++
2 files changed, 3 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 46d288808153..92e19ac45df2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2018-12-17 Vineet Gupta <vgupta@synopsys.com>
* scripts/build-many-glibcs.py: Enable building for ARC.
+ * NEW: Mention ARC port.
2018-12-17 Cupertino Miranda <cmiranda@synopsys.com>
diff --git a/NEWS b/NEWS
index ae80818df4b3..56b21c3b9336 100644
--- a/NEWS
+++ b/NEWS
@@ -1078,6 +1078,8 @@ Version 2.26
Major new features:
+* Port to ARC HS cores has been contributed by Synopsys.
+
* A per-thread cache has been added to malloc. Access to the cache requires
no locks and therefore significantly accelerates the fast path to allocate
and free small amounts of memory. Refilling an empty cache requires locking
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 08/21] ARC: Linux Syscall Interface
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (17 preceding siblings ...)
2018-12-18 21:05 ` [PATCH 07/21] ARC: math soft float support Vineet Gupta
@ 2018-12-18 21:15 ` Vineet Gupta
2018-12-18 23:38 ` Joseph Myers
2018-12-18 21:16 ` [PATCH 15/21] ARC: testsuite fix: elf/check-initfini Vineet Gupta
` (4 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:15 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 12 ++
sysdeps/unix/sysv/linux/arc/cacheflush.c | 29 +++
sysdeps/unix/sysv/linux/arc/clone.S | 100 ++++++++++
sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h | 6 +
sysdeps/unix/sysv/linux/arc/kernel-features.h | 28 +++
sysdeps/unix/sysv/linux/arc/mmap_internal.h | 26 +++
sysdeps/unix/sysv/linux/arc/profil-counter.h | 2 +
sysdeps/unix/sysv/linux/arc/pt-vfork.S | 1 +
sysdeps/unix/sysv/linux/arc/sigaction.c | 69 +++++++
sysdeps/unix/sysv/linux/arc/syscall.S | 38 ++++
sysdeps/unix/sysv/linux/arc/sysdep.c | 33 ++++
sysdeps/unix/sysv/linux/arc/sysdep.h | 259 ++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/vfork.S | 42 +++++
13 files changed, 645 insertions(+)
create mode 100644 sysdeps/unix/sysv/linux/arc/cacheflush.c
create mode 100644 sysdeps/unix/sysv/linux/arc/clone.S
create mode 100644 sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
create mode 100644 sysdeps/unix/sysv/linux/arc/kernel-features.h
create mode 100644 sysdeps/unix/sysv/linux/arc/mmap_internal.h
create mode 100644 sysdeps/unix/sysv/linux/arc/profil-counter.h
create mode 100644 sysdeps/unix/sysv/linux/arc/pt-vfork.S
create mode 100644 sysdeps/unix/sysv/linux/arc/sigaction.c
create mode 100644 sysdeps/unix/sysv/linux/arc/syscall.S
create mode 100644 sysdeps/unix/sysv/linux/arc/sysdep.c
create mode 100644 sysdeps/unix/sysv/linux/arc/sysdep.h
create mode 100644 sysdeps/unix/sysv/linux/arc/vfork.S
diff --git a/ChangeLog b/ChangeLog
index b946f57204b6..08a3ac7e8064 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,6 +44,18 @@
* sysdeps/arc/nofpu/math-tests-exception.h: New file.
* sysdeps/arc/nofpu/math-tests-rounding.h: New file.
* sysdeps/arc/sfp-machine.h: New file.
+ * sysdeps/unix/sysv/linux/arc/cacheflush.c: New file.
+ * sysdeps/unix/sysv/linux/arc/clone.S: New file.
+ * sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h: New file.
+ * sysdeps/unix/sysv/linux/arc/kernel-features.h: New file.
+ * sysdeps/unix/sysv/linux/arc/mmap_internal.h: New file.
+ * sysdeps/unix/sysv/linux/arc/profil-counter.h: New file.
+ * sysdeps/unix/sysv/linux/arc/pt-vfork.S: New file.
+ * sysdeps/unix/sysv/linux/arc/sigaction.c: New file.
+ * sysdeps/unix/sysv/linux/arc/syscall.S: New file.
+ * sysdeps/unix/sysv/linux/arc/sysdep.c: New file.
+ * sysdeps/unix/sysv/linux/arc/sysdep.h: New file.
+ * sysdeps/unix/sysv/linux/arc/vfork.S: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arc/cacheflush.c b/sysdeps/unix/sysv/linux/arc/cacheflush.c
new file mode 100644
index 000000000000..7b14211eccf7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/cacheflush.c
@@ -0,0 +1,29 @@
+/* cacheflush system call for ARC Linux.
+ 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
+ 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 <stddef.h>
+#include <unistd.h>
+
+/* Flush cache(s). */
+int
+_flush_cache (char *addr, const int nbytes, const int op)
+{
+ return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op);
+}
+weak_alias (_flush_cache, cacheflush)
diff --git a/sysdeps/unix/sysv/linux/arc/clone.S b/sysdeps/unix/sysv/linux/arc/clone.S
new file mode 100644
index 000000000000..04f2df5ef06d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/clone.S
@@ -0,0 +1,100 @@
+/* clone() implementation for ARC.
+ 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.
+
+ 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>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+#include <tcb-offsets.h>
+
+#define CLONE_SETTLS 0x00080000
+
+; int clone(int (*fn)(void *), void *child_stack,
+; int flags, void *arg, ...
+; /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */);
+;
+; NOTE: I'm assuming that the last 3 args are NOT var-args and in case all
+; 3 are not relevant, caller will nevertheless pass those as NULL.
+; Current (Jul 2012) upstream powerpc/clone.S assumes similarly.
+; Our LTP (from 2007) doesn't seem to have tests to prove otherwise
+
+; clone syscall in kernel (ABI: CONFIG_CLONE_BACKWARDS)
+;
+; int sys_clone(unsigned long clone_flags,
+; unsigned long newsp,
+; int __user *parent_tidptr,
+; void *tls,
+; int __user *child_tidptr)
+
+ENTRY(__clone)
+ cmp r0, 0 ; @fn can't be NULL
+ cmp.ne r1, 0 ; @child_stack can't be NULL
+ bz .L__sys_err
+
+ ; save some of the orig args
+ ; r0 containg @fn will be clobbered AFTER syscall (with ret val)
+ ; rest are clobbered BEFORE syscall due to different arg ordering
+ mov r10, r0 ; @fn
+ mov r11, r3 ; @args
+ mov r12, r2 ; @clone_flags
+ mov r9, r5 ; @tls
+
+ ; adjust libc args for syscall
+
+ mov r0, r2 ; libc @flags is 1st syscall arg
+ mov r2, r4 ; libc @ptid
+ mov r3, r5 ; libc @tls
+ mov r4, r6 ; libc @ctid
+ mov r8, __NR_clone
+ ARC_TRAP_INSN
+
+ cmp r0, 0 ; return code : 0 new process, !0 parent
+ blt .L__sys_err2 ; < 0 (signed) error
+ jnz [blink] ; Parent returns
+
+ ; ----- child starts here ---------
+
+ ; Setup TP register (only recent kernels v4.19+ do that)
+ and.f 0, r12, CLONE_SETTLS
+ mov.nz r25, r9
+
+ ; child jumps off to @fn with @arg as argument, and returns here
+ jl.d [r10]
+ mov r0, r11
+
+ ; exit() with result from @fn (already in r0)
+ mov r8, __NR_exit
+ ARC_TRAP_INSN
+ ; In case it ever came back
+ flag 1
+
+.L__sys_err:
+ mov r0, -EINVAL
+.L__sys_err2:
+ ; (1) No need to make -ve kernel error code as positive errno
+ ; __syscall_error expects the -ve error code returned by kernel
+ ; (2) r0 still had orig -ve kernel error code
+ ; (3) Tail call to __syscall_error so we dont have to come back
+ ; here hence instead of jmp-n-link (reg push/pop) we do jmp
+ ; (4) No need to route __syscall_error via PLT, B is inherently
+ ; position independent
+ b __syscall_error
+PSEUDO_END (__clone)
+libc_hidden_def (__clone)
+weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
new file mode 100644
index 000000000000..2fec69d21657
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE (32 + 1 + 1024/32) * 4
+#define SIGJMP_BUF_SIZE (32 + 1 + 1024/32) * 4
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 32 * 4
+#define SAVED_MASK_OFFSET 33 * 4
diff --git a/sysdeps/unix/sysv/linux/arc/kernel-features.h b/sysdeps/unix/sysv/linux/arc/kernel-features.h
new file mode 100644
index 000000000000..d8f667ca4759
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/kernel-features.h
@@ -0,0 +1,28 @@
+/* Set flags signalling availability of kernel features based on given
+ kernel version number.
+
+ Copyright (C) 2009-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
+ 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/>. */
+
+/* The minimum supported kernel version for ARC is 3.9,
+ guaranteeing many kernel features. */
+
+#include_next <kernel-features.h>
+
+#undef __ASSUME_CLONE_DEFAULT
+#define __ASSUME_CLONE_BACKWARDS 1
diff --git a/sysdeps/unix/sysv/linux/arc/mmap_internal.h b/sysdeps/unix/sysv/linux/arc/mmap_internal.h
new file mode 100644
index 000000000000..3c8c55d57d0e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/mmap_internal.h
@@ -0,0 +1,26 @@
+/* mmap - map files or devices into memory. Linux/ARC 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
+ 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/>. */
+
+#ifndef MMAP_ARC_INTERNAL_H
+#define MMAP_ARC_INTERNAL_H
+
+#define MMAP2_PAGE_UNIT 8192ULL /* 8K page is default for ARC */
+
+#include_next <mmap_internal.h>
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arc/profil-counter.h b/sysdeps/unix/sysv/linux/arc/profil-counter.h
new file mode 100644
index 000000000000..8a6a0bcf3d59
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/profil-counter.h
@@ -0,0 +1,2 @@
+/* We can use the ix86 version. */
+#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
diff --git a/sysdeps/unix/sysv/linux/arc/pt-vfork.S b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
new file mode 100644
index 000000000000..65cc3823ac87
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/pt-vfork.S>
diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c
new file mode 100644
index 000000000000..0a58e78f8834
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sigaction.c
@@ -0,0 +1,69 @@
+/* ARC specific sigaction and signal restorer
+ Copyright (C) 1997-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
+ 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 <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <sys/syscall.h>
+
+/*
+ * Default sigretrun stub if user doesn't specify SA_RESTORER
+ */
+static void __default_rt_sa_restorer(void)
+{
+ INTERNAL_SYSCALL_NCS(__NR_rt_sigreturn, , 0);
+}
+
+#define SA_RESTORER 0x04000000
+
+/* If @act is not NULL, change the action for @sig to @act.
+ If @oact is not NULL, put the old action for @sig in @oact. */
+int
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
+{
+ struct sigaction kact;
+ const struct sigaction *arg;
+
+ /*
+ * SA_RESTORER is only relevant for act != NULL case
+ * (!act means caller only wants to know @oact)
+ */
+ if (act && !(act->sa_flags & SA_RESTORER)) {
+ kact.sa_restorer = __default_rt_sa_restorer;
+ kact.sa_flags = act->sa_flags | SA_RESTORER;
+
+ kact.sa_handler = act->sa_handler;
+ kact.sa_mask = act->sa_mask;
+
+ arg = &kact;
+ } else {
+ arg = act;
+ }
+
+ /*
+ * syscall also expects sizeof(sa_mask) and asm-generic kernel syscall
+ * ABI mandates it be 2 words (8 bytes below) although glibc defines
+ * sigset_to be much larger (1024 / 32 == 64 bytes)
+ */
+ return INLINE_SYSCALL(rt_sigaction, 4, sig, arg, oact, _NSIG / 8);
+}
+
+libc_hidden_def (__libc_sigaction)
+
+#include <nptl/sigaction.c>
diff --git a/sysdeps/unix/sysv/linux/arc/syscall.S b/sysdeps/unix/sysv/linux/arc/syscall.S
new file mode 100644
index 000000000000..8f76fa43e95f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/syscall.S
@@ -0,0 +1,38 @@
+/* syscall - indirect system call.
+ 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
+ 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>
+
+ENTRY (syscall)
+ mov_s r8, r0
+ mov_s r0, r1
+ mov_s r1, r2
+ mov_s r2, r3
+ mov_s r3, r4
+#ifdef __ARC700__
+ mov r4, r5
+ mov r5, r6
+#else
+ mov_s r4, r5
+ mov_s r5, r6
+#endif
+
+ ARC_TRAP_INSN
+ brhi r0, -1024, .Lcall_syscall_err
+ j [blink]
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.c b/sysdeps/unix/sysv/linux/arc/sysdep.c
new file mode 100644
index 000000000000..d9bcc305b846
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sysdep.c
@@ -0,0 +1,33 @@
+/* ARC wrapper for setting errno
+ Copyright (C) 1997-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
+ 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 <errno.h>
+
+/* All syscall handler come here to avoid generated code bloat due to
+ * GOT reference to errno_location or it's equivalent
+ */
+int __syscall_error(int err_no)
+{
+ __set_errno(-err_no);
+ return -1;
+}
+
+#if IS_IN (libc)
+hidden_def (__syscall_error)
+#endif
diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h
new file mode 100644
index 000000000000..39d1f03c3710
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/sysdep.h
@@ -0,0 +1,259 @@
+/* Assembler macros for ARC.
+ 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
+ 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/>. */
+
+#ifndef _LINUX_ARC_SYSDEP_H
+#define _LINUX_ARC_SYSDEP_H 1
+
+#include <asm/unistd.h>
+#include <sysdeps/arc/sysdep.h>
+#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
+
+/* For RTLD_PRIVATE_ERRNO. */
+#include <dl-sysdep.h>
+
+#include <tls.h>
+
+#undef SYS_ify
+#define SYS_ify(syscall_name) __NR_##syscall_name
+
+#ifdef __ASSEMBLER__
+
+/* This is a "normal" system call stub: if there is an error,
+ it returns -1 and sets errno. */
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ PSEUDO_NOERRNO(name, syscall_name, args) ASM_LINE_SEP \
+ brhi r0, -1024, .Lcall_syscall_err ASM_LINE_SEP
+
+#define ret j [blink]
+
+# undef PSEUDO_END
+# define PSEUDO_END(name) \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+ END (name)
+
+/* --------- helper for SYSCALL_NOERRNO ----------- */
+
+/* This kind of system call stub never returns an error.
+ We return the return value register to the caller unexamined. */
+
+# undef PSEUDO_NOERRNO
+# define PSEUDO_NOERRNO(name, syscall_name, args) \
+ .text ASM_LINE_SEP \
+ ENTRY (name) ASM_LINE_SEP \
+ DO_CALL (syscall_name, args) ASM_LINE_SEP \
+
+/* return the return value register unexamined
+ * r0 is both syscall return reg and function return reg, so no need to do
+ * anything
+ */
+# define ret_NOERRNO \
+ j_s [blink] ASM_LINE_SEP
+
+# undef PSEUDO_END_NOERRNO
+# define PSEUDO_END_NOERRNO(name) \
+ END (name)
+
+/* --------- helper for SYSCALL_ERRVAL ----------- */
+
+/* This kind of system call stub returns the errno code as its return
+ value, or zero for success. We may massage the kernel's return value
+ to meet that ABI, but we never set errno here. */
+
+# undef PSEUDO_ERRVAL
+# define PSEUDO_ERRVAL(name, syscall_name, args) \
+ PSEUDO_NOERRNO(name, syscall_name, args) ASM_LINE_SEP
+
+/* don't set errno, return kernel error (in errno form) or zero */
+# define ret_ERRVAL \
+ rsub r0, r0, 0 ASM_LINE_SEP \
+ ret_NOERRNO
+
+# undef PSEUDO_END_ERRVAL
+# define PSEUDO_END_ERRVAL(name) \
+ END (name)
+
+
+/* To reduce the code footprint, we confine the actual errno access
+ * to single place in __syscall_error()
+ * this takes raw kernel error value, sets errno and returns -1
+ */
+#if IS_IN (libc)
+#define CALL_ERRNO_SETTER_C bl PLTJMP(HIDDEN_JUMPTARGET(__syscall_error))
+#else
+#define CALL_ERRNO_SETTER_C bl PLTJMP(__syscall_error)
+#endif
+
+# define SYSCALL_ERROR_HANDLER \
+.Lcall_syscall_err: ASM_LINE_SEP \
+ st.a blink, [sp, -4] ASM_LINE_SEP \
+ cfi_adjust_cfa_offset (4) ASM_LINE_SEP \
+ cfi_rel_offset (blink, 0) ASM_LINE_SEP \
+ CALL_ERRNO_SETTER_C ASM_LINE_SEP \
+ ld.ab blink, [sp, 4] ASM_LINE_SEP \
+ cfi_adjust_cfa_offset (-4) ASM_LINE_SEP \
+ cfi_restore (blink) ASM_LINE_SEP \
+ j [blink]
+
+# define DO_CALL(syscall_name, args) \
+ mov r8, SYS_ify (syscall_name) ASM_LINE_SEP \
+ ARC_TRAP_INSN ASM_LINE_SEP
+
+#define ARC_TRAP_INSN trap_s 0
+
+#else /* !__ASSEMBLER__ */
+
+# define SINGLE_THREAD_BY_GLOBAL 1
+
+/* In order to get __set_errno() definition in INLINE_SYSCALL. */
+#include <errno.h>
+
+extern int __syscall_error (int);
+
+#if IS_IN (libc)
+hidden_proto (__syscall_error)
+#define CALL_ERRNO_SETTER "bl __syscall_error \n\t"
+#else
+#define CALL_ERRNO_SETTER "bl __syscall_error@plt \n\t"
+#endif
+
+
+/* Define a macro which expands into the inline wrapper code for a system
+ call. */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr_args, args...) \
+({ \
+ register int __res __asm__("r0"); \
+ __res = INTERNAL_SYSCALL_NCS(__NR_##name, , nr_args, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P ((__res), ), 0)) \
+ { \
+ asm volatile ("st.a blink, [sp, -4] \n\t" \
+ CALL_ERRNO_SETTER \
+ "ld.ab blink, [sp, 4] \n\t" \
+ :"+r" (__res) \
+ : \
+ :"r1","r2","r3","r4","r5","r6", \
+ "r7","r8","r9","r10","r11","r12"); \
+ } \
+ __res; \
+})
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+
+#undef INTERNAL_SYSCALL_ERRNO
+# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
+
+/* -1 to -1023 are valid errno values */
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+ ((unsigned int) (val) > -1024U)
+
+#define ARC_TRAP_INSN "trap_s 0 \n\t"
+
+#undef INTERNAL_SYSCALL_RAW
+#define INTERNAL_SYSCALL_RAW(name, err, nr_args, args...) \
+({ \
+ /* Per ABI, r0 is 1st arg and return reg */ \
+ register int __ret __asm__("r0"); \
+ register int _sys_num __asm__("r8"); \
+ \
+ LOAD_ARGS_##nr_args (name, args) \
+ \
+ __asm__ volatile ( \
+ ARC_TRAP_INSN \
+ : "+r" (__ret) \
+ : "r"(_sys_num) ASM_ARGS_##nr_args \
+ : "memory"); \
+ \
+ __ret; \
+})
+
+/* Macros for setting up inline __asm__ input regs */
+#define ASM_ARGS_0
+#define ASM_ARGS_1 ASM_ARGS_0, "r" (__ret)
+#define ASM_ARGS_2 ASM_ARGS_1, "r" (_arg2)
+#define ASM_ARGS_3 ASM_ARGS_2, "r" (_arg3)
+#define ASM_ARGS_4 ASM_ARGS_3, "r" (_arg4)
+#define ASM_ARGS_5 ASM_ARGS_4, "r" (_arg5)
+#define ASM_ARGS_6 ASM_ARGS_5, "r" (_arg6)
+#define ASM_ARGS_7 ASM_ARGS_6, "r" (_arg7)
+
+/* Macros for converting sys-call wrapper args into sys call args */
+#define LOAD_ARGS_0(nm, arg) \
+ _sys_num = (int) (nm);
+
+#define LOAD_ARGS_1(nm, arg1) \
+ __ret = (int) (arg1); \
+ LOAD_ARGS_0 (nm, arg1)
+
+/*
+ * Note that the use of _tmpX might look superflous, however it is needed
+ * to ensure that register variables are not clobbered if arg happens to be
+ * a function call itself. e.g. sched_setaffinity() calling getpid() for arg2
+ *
+ * Also this specific order of recursive calling is important to segregate
+ * the tmp args evaluation (function call case described above) and assigment
+ * of register variables
+ */
+#define LOAD_ARGS_2(nm, arg1, arg2) \
+ int _tmp2 = (int) (arg2); \
+ LOAD_ARGS_1 (nm, arg1) \
+ register int _arg2 __asm__ ("r1") = _tmp2;
+
+#define LOAD_ARGS_3(nm, arg1, arg2, arg3) \
+ int _tmp3 = (int) (arg3); \
+ LOAD_ARGS_2 (nm, arg1, arg2) \
+ register int _arg3 __asm__ ("r2") = _tmp3;
+
+#define LOAD_ARGS_4(nm, arg1, arg2, arg3, arg4) \
+ int _tmp4 = (int) (arg4); \
+ LOAD_ARGS_3 (nm, arg1, arg2, arg3) \
+ register int _arg4 __asm__ ("r3") = _tmp4;
+
+#define LOAD_ARGS_5(nm, arg1, arg2, arg3, arg4, arg5) \
+ int _tmp5 = (int) (arg5); \
+ LOAD_ARGS_4 (nm, arg1, arg2, arg3, arg4) \
+ register int _arg5 __asm__ ("r4") = _tmp5;
+
+#define LOAD_ARGS_6(nm, arg1, arg2, arg3, arg4, arg5, arg6) \
+ int _tmp6 = (int) (arg6); \
+ LOAD_ARGS_5 (nm, arg1, arg2, arg3, arg4, arg5) \
+ register int _arg6 __asm__ ("r5") = _tmp6;
+
+#define LOAD_ARGS_7(nm, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
+ int _tmp7 = (int) (arg7); \
+ LOAD_ARGS_6 (nm, arg1, arg2, arg3, arg4, arg5, arg6) \
+ register int _arg7 __asm__ ("r6") = _tmp7;
+
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+ INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
+
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+ INTERNAL_SYSCALL_RAW(number, err, nr, args)
+
+/* Pointer mangling not yet supported */
+# define PTR_MANGLE(var) (void) (var)
+# define PTR_DEMANGLE(var) (void) (var)
+
+#endif /* !__ASSEMBLER__ */
+
+#endif /* linux/arc/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/arc/vfork.S b/sysdeps/unix/sysv/linux/arc/vfork.S
new file mode 100644
index 000000000000..6d7f63c9900b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/vfork.S
@@ -0,0 +1,42 @@
+/* vfork for ARC Linux.
+ 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
+ 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 <sys/syscall.h>
+#include <sysdep.h>
+#include <tcb-offsets.h>
+#define _SIGNAL_H
+#include <bits/signum.h> /* For SIGCHLD */
+
+#define CLONE_VM 0x00000100
+#define CLONE_VFORK 0x00004000
+#define CLONE_FLAGS_FOR_VFORK (CLONE_VM|CLONE_VFORK|SIGCHLD)
+
+ENTRY(__vfork)
+ mov r0, CLONE_FLAGS_FOR_VFORK
+ mov_s r1, sp
+ mov r8, __NR_clone
+ ARC_TRAP_INSN
+
+ cmp r0, 0
+ jge [blink] ; child continues
+
+ b __syscall_error
+PSEUDO_END (__vfork)
+libc_hidden_def (__vfork)
+
+weak_alias (__vfork, vfork)
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 15/21] ARC: testsuite fix: elf/check-initfini
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (18 preceding siblings ...)
2018-12-18 21:15 ` [PATCH 08/21] ARC: Linux Syscall Interface Vineet Gupta
@ 2018-12-18 21:16 ` Vineet Gupta
2018-12-18 21:26 ` [PATCH 10/21] ARC: Linux Startup and Dynamic Loading Vineet Gupta
` (3 subsequent siblings)
23 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:16 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 1 +
sysdeps/arc/crti.S | 2 ++
2 files changed, 3 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 86e4db890850..909b1af09a31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -108,6 +108,7 @@
* sysdeps/arc/dl-machine.h: replace _start with __start.
* sysdeps/arc/start.S: likewise.
* sysdeps/arc/entry.h: Add ENTRY_POINT define check.
+ * sysdeps/arc/crti.S: add .hidden annotations.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S
index 8b823b54a29d..ea741b30e3cf 100644
--- a/sysdeps/arc/crti.S
+++ b/sysdeps/arc/crti.S
@@ -53,6 +53,7 @@
.section .init
.align 4
.global _init
+ .hidden _init
.type _init,@function
_init:
st.a blink, [sp,-4]
@@ -69,6 +70,7 @@ _init:
.section .fini
.align 4
.global _fini
+ .hidden _fini
.type _fini,@function
_fini:
st.a blink,[sp,-4]
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* [PATCH 10/21] ARC: Linux Startup and Dynamic Loading
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (19 preceding siblings ...)
2018-12-18 21:16 ` [PATCH 15/21] ARC: testsuite fix: elf/check-initfini Vineet Gupta
@ 2018-12-18 21:26 ` Vineet Gupta
2018-12-18 23:52 ` Joseph Myers
2018-12-18 22:56 ` [PATCH 00/21] glibc port to ARC processors Joseph Myers
` (2 subsequent siblings)
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:26 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc, Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
ChangeLog | 3 ++
sysdeps/unix/sysv/linux/arc/dl-static.c | 84 +++++++++++++++++++++++++++++++++
sysdeps/unix/sysv/linux/arc/ldconfig.h | 25 ++++++++++
sysdeps/unix/sysv/linux/arc/ldsodefs.h | 32 +++++++++++++
4 files changed, 144 insertions(+)
create mode 100644 sysdeps/unix/sysv/linux/arc/dl-static.c
create mode 100644 sysdeps/unix/sysv/linux/arc/ldconfig.h
create mode 100644 sysdeps/unix/sysv/linux/arc/ldsodefs.h
diff --git a/ChangeLog b/ChangeLog
index ca010c356597..f6ad5968d7de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -71,6 +71,9 @@
* sysdeps/unix/sysv/linux/arc/sys/user.h: New file.
* sysdeps/unix/sysv/linux/arc/ucontext-macros.h: New file.
* sysdeps/unix/sysv/linux/arc/ucontext_i.sym: New file.
+ * sysdeps/unix/sysv/linux/arc/dl-static.c: New file.
+ * sysdeps/unix/sysv/linux/arc/ldconfig.h: New file.
+ * sysdeps/unix/sysv/linux/arc/ldsodefs.h: New file.
2018-12-17 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arc/dl-static.c b/sysdeps/unix/sysv/linux/arc/dl-static.c
new file mode 100644
index 000000000000..2683ee5e7e2a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/dl-static.c
@@ -0,0 +1,84 @@
+/* Variable initialization. ARC version.
+ Copyright (C) 2001-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
+ 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 <ldsodefs.h>
+
+#ifdef SHARED
+
+void
+_dl_var_init (void *array[])
+{
+ /* It has to match "variables" below. */
+ enum
+ {
+ DL_PAGESIZE = 0
+ };
+
+ GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
+}
+
+#else
+
+static void *variables[] =
+{
+ &GLRO(dl_pagesize)
+};
+
+static void
+_dl_unprotect_relro (struct link_map *l)
+{
+ ElfW(Addr) start = ((l->l_addr + l->l_relro_addr)
+ & ~(GLRO(dl_pagesize) - 1));
+ ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size)
+ & ~(GLRO(dl_pagesize) - 1));
+
+ if (start != end)
+ __mprotect ((void *) start, end - start, PROT_READ | PROT_WRITE);
+}
+
+void
+_dl_static_init (struct link_map *l)
+{
+ struct link_map *rtld_map = l;
+ struct r_scope_elem **scope;
+ const ElfW(Sym) *ref = NULL;
+ lookup_t loadbase;
+ void (*f) (void *[]);
+ size_t i;
+
+ loadbase = _dl_lookup_symbol_x ("_dl_var_init", l, &ref, l->l_local_scope,
+ NULL, 0, 1, NULL);
+
+ for (scope = l->l_local_scope; *scope != NULL; scope++)
+ for (i = 0; i < (*scope)->r_nlist; i++)
+ if ((*scope)->r_list[i] == loadbase)
+ {
+ rtld_map = (*scope)->r_list[i];
+ break;
+ }
+
+ if (ref != NULL)
+ {
+ f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
+ _dl_unprotect_relro (rtld_map);
+ f (variables);
+ _dl_protect_relro (rtld_map);
+ }
+}
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arc/ldconfig.h b/sysdeps/unix/sysv/linux/arc/ldconfig.h
new file mode 100644
index 000000000000..c38ce20edaea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/ldconfig.h
@@ -0,0 +1,25 @@
+/* dynamic linker names for ARC
+ Copyright (C) 2001-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
+ 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 <sysdeps/generic/ldconfig.h>
+
+#define SYSDEP_KNOWN_INTERPRETER_NAMES \
+ { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
+#define SYSDEP_KNOWN_LIBRARY_NAMES \
+ { "libc.so.6", FLAG_ELF_LIBC6 }, \
+ { "libm.so.6", FLAG_ELF_LIBC6 },
diff --git a/sysdeps/unix/sysv/linux/arc/ldsodefs.h b/sysdeps/unix/sysv/linux/arc/ldsodefs.h
new file mode 100644
index 000000000000..005c49a7b7cd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arc/ldsodefs.h
@@ -0,0 +1,32 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects. ARC
+ Copyright (C) 2001-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
+ 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/>. */
+
+#ifndef _LDSODEFS_H
+
+/* Get the real definitions. */
+#include_next <ldsodefs.h>
+
+/* Now define our stuff. */
+
+/* We need special support to initialize DSO loaded for statically linked
+ binaries. */
+extern void _dl_static_init (struct link_map *map);
+#undef DL_STATIC_INIT
+#define DL_STATIC_INIT(map) _dl_static_init (map)
+
+#endif /* ldsodefs.h */
--
2.7.4
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls
2018-12-18 21:05 ` [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
@ 2018-12-18 21:28 ` Florian Weimer
2018-12-18 21:31 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Florian Weimer @ 2018-12-18 21:28 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
* Vineet Gupta:
> diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
> index f88001c9c38d..62862010600f 100644
> --- a/sysdeps/unix/sysv/linux/syscall-names.list
> +++ b/sysdeps/unix/sysv/linux/syscall-names.list
> @@ -42,6 +42,9 @@ adjtimex
> afs_syscall
> alarm
> alloc_hugepages
> +arc_gettls
> +arc_settls
> +arc_usr_cmpxchg
> arch_prctl
> arm_fadvise64_64
> arm_sync_file_range
This should come in with a sync with a released upstream kernel. Will
the port be in Linux 4.20?
Thanks,
Florian
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start
2018-12-18 21:05 ` [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start Vineet Gupta
@ 2018-12-18 21:29 ` Florian Weimer
2018-12-18 22:06 ` Vineet Gupta
2018-12-19 20:36 ` Vineet Gupta
0 siblings, 2 replies; 99+ messages in thread
From: Florian Weimer @ 2018-12-18 21:29 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
* Vineet Gupta:
> ARC linker scripts have defined __start as entry point so to not break
> ABI for uClibc et al we allow __start for glibc as well
I think this change and the test suite fixes should be folded into the
initial addition of these files. Or is there a reason for not doing
this?
Thanks,
Florian
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls
2018-12-18 21:28 ` Florian Weimer
@ 2018-12-18 21:31 ` Vineet Gupta
2018-12-19 8:16 ` Florian Weimer
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 21:31 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 1:26 PM, Florian Weimer wrote:
> This should come in with a sync with a released upstream kernel. Will
> the port be in Linux 4.20?
linux port was upstreamed in 2013 in v3.9
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start
2018-12-18 21:29 ` Florian Weimer
@ 2018-12-18 22:06 ` Vineet Gupta
2018-12-18 23:07 ` Joseph Myers
2018-12-19 20:36 ` Vineet Gupta
1 sibling, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 22:06 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 1:28 PM, Florian Weimer wrote:
>> ARC linker scripts have defined __start as entry point so to not break
>> ABI for uClibc et al we allow __start for glibc as well
> I think this change and the test suite fixes should be folded into the
> initial addition of these files. Or is there a reason for not doing
> this?
I deliberately kept them out to call out the fixes, sometimes these help new ports
which stumble into similar issues. And also ~2 years worth of work gets squashed
into a single blob is a shame :-)
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 11/21] ARC: ABI lists
2018-12-18 21:05 ` [PATCH 11/21] ARC: ABI lists Vineet Gupta
@ 2018-12-18 22:32 ` Andreas Schwab
2018-12-18 22:36 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Andreas Schwab @ 2018-12-18 22:32 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Dez 18 2018, Vineet Gupta <vineet.gupta1@synopsys.com> wrote:
> sysdeps/unix/sysv/linux/arc/libnsl.abilist | 120 ++
You don't need that any more.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 11/21] ARC: ABI lists
2018-12-18 22:32 ` Andreas Schwab
@ 2018-12-18 22:36 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 22:36 UTC (permalink / raw)
To: Andreas Schwab; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 2:31 PM, Andreas Schwab wrote:
>> sysdeps/unix/sysv/linux/arc/libnsl.abilist | 120 ++
> You don't need that any more.
Ok ! deleted now !
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext
2018-12-18 21:05 ` [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext Vineet Gupta
@ 2018-12-18 22:40 ` Andreas Schwab
2019-01-21 22:32 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Andreas Schwab @ 2018-12-18 22:40 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Dez 18 2018, Vineet Gupta <vineet.gupta1@synopsys.com> wrote:
> diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S b/sysdeps/unix/sysv/linux/arc/setcontext.S
> index 3f503c661d95..6ec2ec0ddc79 100644
> --- a/sysdeps/unix/sysv/linux/arc/setcontext.S
> +++ b/sysdeps/unix/sysv/linux/arc/setcontext.S
> @@ -79,6 +79,8 @@ weak_alias(__setcontext, setcontext)
>
> ENTRY(__startcontext)
>
> + cfi_register (blink, r15)
> +
You should precede that with a dummy .cfi_label (see
sysdeps/riscv/start.S) to force the CFI into the FDE instead of the
CIE. Also, can you use cfi_undefined instead?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (20 preceding siblings ...)
2018-12-18 21:26 ` [PATCH 10/21] ARC: Linux Startup and Dynamic Loading Vineet Gupta
@ 2018-12-18 22:56 ` Joseph Myers
2018-12-18 23:09 ` Vineet Gupta
2018-12-18 23:15 ` Joseph Myers
2018-12-20 21:54 ` test related questions (was Re: [PATCH 00/21] glibc port to ARC processors) Vineet Gupta
23 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 22:56 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> | FAIL: elf/check-localplt # passes for build-many-glibcs.py
> # buildroot builds with slightly different toggles (-Os)
> # such that gcc generates an extra memcpy PLT call
I fixed lots of such issues with -Os on various architectures; it should
be possible to fix this one as well. (I haven't run build-many-glibcs.py
with -Os lately, so it's possible more problems have crept in or appear
with current compilers. When I was testing it, it failed for m68k - the
m68k libm functions don't build with -Os because bits/mathinline.h doesn't
get included then, which needs addressing anyway in some way to eliminate
bits/mathinline.h from glibc - but worked for most or all other
configurations.)
> (d) We currently only support soft float ABI, although I'm working on hard float
> and hopefully will have it ready sometime during the review of this series
Could you confirm what the ABI entry or entries to go at
<https://sourceware.org/glibc/wiki/ABIList> would look like?
Note that we generally expect new ports to use different dynamic linker
names for each ABI. This means separate names for hard float and soft
float. Since it appears you support both big and little endian, it also
means separate dynamic linker names for each of those (and corresponding
GCC changes will be needed to pass the right dynamic linker names to ld's
-dynamic-linker option). Then, each supported ABI should have a build in
build-many-glibcs.py, and any unsupported ABI variants need to have a
configure-time error (to avoid accidentally building a glibc incompatible
with the correct ABI for such a port added in future).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints
2018-12-18 21:05 ` [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints Vineet Gupta
@ 2018-12-18 22:59 ` Joseph Myers
2018-12-18 23:11 ` Vineet Gupta
2018-12-21 18:55 ` Joseph Myers
1 sibling, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 22:59 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> diff --git a/ChangeLog b/ChangeLog
> index 027b23493ed8..456e4b670c23 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -2,6 +2,7 @@
>
> * sysdeps/unix/make-syscalls.sh: Fix comment referencing
> syscall-template file.
> + * stdlib/longlong.h: Fix asm constraints for ARC code.
I don't see the above context in the current checked-in ChangeLog file.
Patch 1 in a series should be creating a new ChangeLog entry in any case,
not adding to an existing one (and it's best not to include the ChangeLog
entry in the diffs, only adding it at the final commit time, to avoid
problems for people applying your patches).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start
2018-12-18 22:06 ` Vineet Gupta
@ 2018-12-18 23:07 ` Joseph Myers
2018-12-18 23:10 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:07 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Florian Weimer, libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> On 12/18/18 1:28 PM, Florian Weimer wrote:
> >> ARC linker scripts have defined __start as entry point so to not break
> >> ABI for uClibc et al we allow __start for glibc as well
> > I think this change and the test suite fixes should be folded into the
> > initial addition of these files. Or is there a reason for not doing
> > this?
>
> I deliberately kept them out to call out the fixes, sometimes these help
> new ports which stumble into similar issues. And also ~2 years worth of
> work gets squashed into a single blob is a shame :-)
Postings of a new port should generally post each new file in the form in
which it is intended to be committed (and, thus, the form in which it
should be reviewed); you should never post a known-buggy version and a
subsequent fix to the bug; that wastes reviewers' time. (The actual
commit of the port should be a single commit with everything, modulo
possible separate earlier commits for changes to architecture-independent
files, as the port isn't useful with only a subset of the new files
added.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-18 22:56 ` [PATCH 00/21] glibc port to ARC processors Joseph Myers
@ 2018-12-18 23:09 ` Vineet Gupta
2018-12-19 0:02 ` Joseph Myers
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 23:09 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 2:52 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> | FAIL: elf/check-localplt # passes for build-many-glibcs.py
>> # buildroot builds with slightly different toggles (-Os)
>> # such that gcc generates an extra memcpy PLT call
>
> I fixed lots of such issues with -Os on various architectures; it should
> be possible to fix this one as well. (I haven't run build-many-glibcs.py
> with -Os lately, so it's possible more problems have crept in or appear
> with current compilers. When I was testing it, it failed for m68k - the
> m68k libm functions don't build with -Os because bits/mathinline.h doesn't
> get included then, which needs addressing anyway in some way to eliminate
> bits/mathinline.h from glibc - but worked for most or all other
> configurations.)
The actual xcheck runs posted later on have been with buildroot built toolchain
which defaults to -Os, so it works for ARC, except for this additional entry.
At any rate, the generated code will likely be different for -Os and otherwise,
does that mean entries get added conditionally to localplt.data etc ?
>> (d) We currently only support soft float ABI, although I'm working on hard float
>> and hopefully will have it ready sometime during the review of this series
>
> Could you confirm what the ABI entry or entries to go at
> <https://sourceware.org/glibc/wiki/ABIList> would look like?
soft-float LE: ld-linux-arc.so.2
hard-float LE: ld-linux-archf.so.2 (although this is just a preference)
> Note that we generally expect new ports to use different dynamic linker
> names for each ABI. This means separate names for hard float and soft
> float. Since it appears you support both big and little endian, it also
> means separate dynamic linker names for each of those (and corresponding
> GCC changes will be needed to pass the right dynamic linker names to ld's
> -dynamic-linker option).
ARC historically has supported both LE/BE, but we are kind of moving away from BE
and as far as I know, there's no-one actively working with BE (except 1 specific
customer with legact cores). It is safe to assume we won't support BE and this is
sort of easier said for ARC processors as they have many many hardware config
knobs and not all are supported for Linux usecase, so BE can be considered as such.
> Then, each supported ABI should have a build in
> build-many-glibcs.py, and any unsupported ABI variants need to have a
> configure-time error (to avoid accidentally building a glibc incompatible
> with the correct ABI for such a port added in future).
Right, at this point I only have soft-float and work is ongoing for hard.
Thx for taking a look.
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start
2018-12-18 23:07 ` Joseph Myers
@ 2018-12-18 23:10 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 23:10 UTC (permalink / raw)
To: Joseph Myers; +Cc: Florian Weimer, libc-alpha, linux-snps-arc
On 12/18/18 2:59 PM, Joseph Myers wrote:
>> I deliberately kept them out to call out the fixes, sometimes these help
>> new ports which stumble into similar issues. And also ~2 years worth of
>> work gets squashed into a single blob is a shame :-)
>
> Postings of a new port should generally post each new file in the form in
> which it is intended to be committed (and, thus, the form in which it
> should be reviewed); you should never post a known-buggy version and a
> subsequent fix to the bug; that wastes reviewers' time. (The actual
> commit of the port should be a single commit with everything, modulo
> possible separate earlier commits for changes to architecture-independent
> files, as the port isn't useful with only a subset of the new files
> added.
Ok I can certainly squash them in next version.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints
2018-12-18 22:59 ` Joseph Myers
@ 2018-12-18 23:11 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-18 23:11 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 2:56 PM, Joseph Myers wrote:
>> * sysdeps/unix/make-syscalls.sh: Fix comment referencing
>> syscall-template file.
>> + * stdlib/longlong.h: Fix asm constraints for ARC code.
>
> I don't see the above context in the current checked-in ChangeLog file.
> Patch 1 in a series should be creating a new ChangeLog entry in any case,
> not adding to an existing one (and it's best not to include the ChangeLog
> entry in the diffs, only adding it at the final commit time, to avoid
> problems for people applying your patches).
Sorry my bad. I had one preceding patch in the pile which
- created the Changlog entry
- fixed a minor typo in make-syscalls.sh
I'll add that to v2.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 03/21] ARC: ABI Implementation
2018-12-18 21:05 ` [PATCH 03/21] ARC: ABI Implementation Vineet Gupta
@ 2018-12-18 23:11 ` Joseph Myers
2018-12-19 2:39 ` Vineet Gupta
2019-01-28 23:04 ` ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation) Vineet Gupta
0 siblings, 2 replies; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:11 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> +/* FLAG 1 is privilege mode only instruction, hence will crash any program */
Generally, throughout the port, make sure comments end ". " (full stop,
two spaces, end of comment). I won't remark on other places with this
formatting issue.
> diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S
As a new port I think it would be best to use init_array in your Implies
file so you don't need these crti / crtn files, and make GCC generate
init_array / fini_array exclusively. (See RISC-V and C-Sky discussions of
this issue.)
> +#ifdef __A7__
> +#define ARC_PLT_SIZE 12
> +#else
> +#define ARC_PLT_SIZE 16
> +#endif
Except for the multiple-include guards round a whole header file,
preprocessor directives inside #if should have indentation in glibc, so
"# define" (and "# define" inside two levels of #if, etc.). (As usual,
fix this throughout the port; I won't list other individual places with
this issue.)
> +#define reloc_index \
> +({ \
> + unsigned long plt0 = D_PTR (l, l_info[DT_PLTGOT]); \
> + unsigned long pltn = reloc_arg; \
> + /* exclude PL0 and PLT1 */ \
Note the first letter of a comment should be capitalized (in addition to
ending with ". ").
> + unsigned long idx = (pltn - plt0)/ARC_PLT_SIZE - 2; \
glibc style uses "unsigned long int", not just "unsigned long".
> diff --git a/sysdeps/arc/tls-macros.h b/sysdeps/arc/tls-macros.h
> new file mode 100644
> index 000000000000..51855edef6e7
> --- /dev/null
> +++ b/sysdeps/arc/tls-macros.h
> @@ -0,0 +1,29 @@
> +/* Macros to support TLS testing in times of missing compiler support. */
Any file more than ten lines long should have copyright and license
notices.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (21 preceding siblings ...)
2018-12-18 22:56 ` [PATCH 00/21] glibc port to ARC processors Joseph Myers
@ 2018-12-18 23:15 ` Joseph Myers
2018-12-19 23:51 ` Vineet Gupta
2018-12-20 21:54 ` test related questions (was Re: [PATCH 00/21] glibc port to ARC processors) Vineet Gupta
23 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:15 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
Another general point: when posting a new port, could you include pointers
to architecture and ABI reference manuals in case those are of relevance
to the review? (URLs going directly to PDFs of those manuals are
preferred.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 06/21] ARC: Atomics and Locking primitives
2018-12-18 21:05 ` [PATCH 06/21] ARC: Atomics and Locking primitives Vineet Gupta
@ 2018-12-18 23:23 ` Joseph Myers
2019-01-15 0:41 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:23 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> +#define USE_ATOMIC_COMPILER_BUILTINS 0
There is a strong preference for new ports to use 1 for this rather than 0
(and not to have any asms in their atomic-machine.h unless there's some
reason use of built-in functions is unsuitable) - see the recently posted
C-Sky version, for example. If you can't use 1, there should be a good
reason, documented in a comment, for using asms instead of compiler
built-in functions (e.g. if the compiler built-in functions would result
in libatomic dependencies, which are unsuitable for glibc, rather than
being expanded inline).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 07/21] ARC: math soft float support
2018-12-18 21:05 ` [PATCH 07/21] ARC: math soft float support Vineet Gupta
@ 2018-12-18 23:24 ` Joseph Myers
2018-12-19 0:52 ` Joseph Myers
2018-12-21 1:21 ` Vineet Gupta
0 siblings, 2 replies; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:24 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__)
Missing spaces before '(' (should have such spaces in most cases between
an identifier or keyword and '(' - calls to "defined", calls to functions,
calls to macros, __attribute__, etc. - except for a few cases of calls to
macros such as ElfW where the result is logically used like an
identifier).
> +/* In the soft-float case, only rounding to nearest is supported, with
> + no exceptions. */
To confirm: hard-float and soft-float are always different ABIs; you don't
support hard-float compilation using the soft-float function calling ABI
(like is supported for ARM and RISC-V, for example)? (If you support
hard-float compilation with the soft-float ABI, it would be problematic to
have different FE_TONEAREST values in the two cases - ARM and RISC-V both
define all the FE_* macros independently of whether hard or soft float is
used, because they support that case.)
> diff --git a/sysdeps/arc/math_private.h b/sysdeps/arc/math_private.h
This file should not be needed now.
> diff --git a/sysdeps/arc/nofpu/math-tests-exception.h b/sysdeps/arc/nofpu/math-tests-exception.h
This file does nothing (the name is wrong, the name actually used is
math-tests-exceptions.h). And it should not be needed unless you support
hard-float compilation with the soft-float ABI (and thus define all the
FE_* names in bits/fenv.h even for soft-float).
> diff --git a/sysdeps/arc/nofpu/math-tests-rounding.h b/sysdeps/arc/nofpu/math-tests-rounding.h
Again, not needed unless hard-float compilation with the soft-float ABI is
supported and bits/fenv.h has corresponding contents.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 04/21] ARC: startup and dynamic linking code
2018-12-18 21:05 ` [PATCH 04/21] ARC: startup and dynamic linking code Vineet Gupta
@ 2018-12-18 23:31 ` Joseph Myers
2018-12-19 1:19 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:31 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> +/*
> + * Dynamic Linking ABI for ARCv2 ISA
> + *
glibc does not use leading '*' on each line of a comment (needs fixing
throughout this file).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 08/21] ARC: Linux Syscall Interface
2018-12-18 21:15 ` [PATCH 08/21] ARC: Linux Syscall Interface Vineet Gupta
@ 2018-12-18 23:38 ` Joseph Myers
2018-12-19 8:16 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:38 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> +/* Flush cache(s). */
> +int
> +_flush_cache (char *addr, const int nbytes, const int op)
> +{
> + return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op);
> +}
> +weak_alias (_flush_cache, cacheflush)
Can't this use a syscalls.list entry instead of needing its own .c file?
> diff --git a/sysdeps/unix/sysv/linux/arc/pt-vfork.S b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
> new file mode 100644
> index 000000000000..65cc3823ac87
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
> @@ -0,0 +1 @@
> +#include <sysdeps/unix/sysv/linux/alpha/pt-vfork.S>
This does nothing for a new port (it's just defining compat symbols). I'd
expect
/* Not needed. */
instead, as for RISC-V.
> diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c
Why do you need this, rather than using the unified version (possibly with
a few macros defined first)?
> +/* All syscall handler come here to avoid generated code bloat due to
> + * GOT reference to errno_location or it's equivalent
> + */
> +int __syscall_error(int err_no)
Return type goes on a separate line to the function name in a function
definition. (This is in addition to the formatting issues that have been
noted elsewhere in the patch series, of which this code has at least three
- '*' at start of comment lines, missing '.' at end of comment and missing
space before '('.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 09/21] ARC: Linux ABI
2018-12-18 21:05 ` [PATCH 09/21] ARC: Linux ABI Vineet Gupta
@ 2018-12-18 23:44 ` Joseph Myers
2018-12-19 20:20 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:44 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> +typedef unsigned short int __pr_uid_t;
> +typedef unsigned short int __pr_gid_t;
Are you sure? I don't see an ARC-specific definition of __kernel_uid_t or
__kernel_gid_t in the Linux kernel at all (which would mean unsigned int
is actually used and you don't need this header at all).
> diff --git a/sysdeps/unix/sysv/linux/arc/bits/sigaction.h b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h
I wouldn't expect new architectures to have their own bits/sigaction.h.
Rather, I'd expect them to use the generic bits/sigaction.h and the
generic code to convert from the userspace struct sigaction to the kernel
version.
> +#ifdef __USE_MISC
> +# define __ctx(fld) fld
> +#else
> +# define __ctx(fld) __ ## fld
> +#endif
New ports should just use namespace-clean field names here
unconditionally. The __ctx macros with __USE_MISC conditionals are purely
for maximum API-compatibility for existing ports that needed to be fixed
to make them namespace-clean.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 13/21] ARC: Build Infrastructure
2018-12-18 21:05 ` [PATCH 13/21] ARC: Build Infrastructure Vineet Gupta
@ 2018-12-18 23:46 ` Joseph Myers
2018-12-19 22:00 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:46 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> +libc {
> + GLIBC_2.29 {
> + __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2;
> + __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi;
> + __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi;
> + __floatdidf; __floatdisf; __floatsidf; __floatsisf;
> + __floatundidf; __floatundisf; __floatunsidf; __floatunsisf;
> + __gedf2; __gesf2; __gtdf2; __gtsf2; __ledf2; __lesf2; __ltdf2; __ltsf2;
> + __muldf3; __mulsf3; __nedf2; __nesf2; __negdf2; __negsf2;
> + __subdf3; __subsf3; __truncdfsf2; __unorddf2; __unordsf2;
Exporting soft-fp symbols from glibc is only appropriate if you are also
building soft-fp in glibc (as opposed to building it in libgcc) - which
might be done with a view to possibly enabling support for exceptions and
rounding modes for soft-float, as on powerpc soft-float, for example. I
don't see a Subdirs files containing "soft-fp" in this patch series. If
you're just linking with libgcc, you should not be re-exporting these
functions from libc.so (and indeed I don't see them in your ABI baselines
- libgcc.a has them as hidden symbols to prevent such re-exporting).
> +libc_cv_fpie=no
Why? I'd expect -fpie to be working for all glibc architectures with any
modern GCC version (I wouldn't expect it to need extra GCC back-end
support beyond -fpic).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 21/21] NEWS: mention ARC port
2018-12-18 21:05 ` [PATCH 21/21] NEWS: mention ARC port Vineet Gupta
@ 2018-12-18 23:49 ` Joseph Myers
2018-12-19 19:11 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:49 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> @@ -1078,6 +1078,8 @@ Version 2.26
>
> Major new features:
>
> +* Port to ARC HS cores has been contributed by Synopsys.
> +
Obviously this belongs under 2.29, or whatever version gets the port, not
2.26.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 10/21] ARC: Linux Startup and Dynamic Loading
2018-12-18 21:26 ` [PATCH 10/21] ARC: Linux Startup and Dynamic Loading Vineet Gupta
@ 2018-12-18 23:52 ` Joseph Myers
2018-12-19 20:30 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-18 23:52 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> diff --git a/sysdeps/unix/sysv/linux/arc/ldconfig.h b/sysdeps/unix/sysv/linux/arc/ldconfig.h
This header should only be needed if you support multiple ABIs
simultaneously on the same system; note most architectures don't have it.
Maybe it will be relevant when you add support for the hard-float ABI, but
not yet.
> +#define SYSDEP_KNOWN_INTERPRETER_NAMES \
> + { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
That's not the dynamic linker name you're using elsewhere.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-18 23:09 ` Vineet Gupta
@ 2018-12-19 0:02 ` Joseph Myers
2018-12-21 3:28 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-19 0:02 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> At any rate, the generated code will likely be different for -Os and otherwise,
> does that mean entries get added conditionally to localplt.data etc ?
Entries *can* have a "?" to indicate they are optional (although avoiding
the PLT reference is better - see how include/string.h does asm
redirection of mempcpy and stpcpy, or likewise in
sysdeps/wordsize-32/divdi3-symbol-hacks.h, for example).
> ARC historically has supported both LE/BE, but we are kind of moving
> away from BE and as far as I know, there's no-one actively working with
> BE (except 1 specific customer with legact cores). It is safe to assume
> we won't support BE and this is sort of easier said for ARC processors
> as they have many many hardware config knobs and not all are supported
> for Linux usecase, so BE can be considered as such.
In that case, there should be a #error in bits/endian.h, or a
configure-time error, or something like that, to make clear the glibc port
does not support BE.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 07/21] ARC: math soft float support
2018-12-18 23:24 ` Joseph Myers
@ 2018-12-19 0:52 ` Joseph Myers
2018-12-20 21:55 ` Vineet Gupta
2018-12-21 1:21 ` Vineet Gupta
1 sibling, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-19 0:52 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
> > +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__)
>
> Missing spaces before '(' (should have such spaces in most cases between
> an identifier or keyword and '(' - calls to "defined", calls to functions,
> calls to macros, __attribute__, etc. - except for a few cases of calls to
> macros such as ElfW where the result is logically used like an
> identifier).
Or, of course, just omit the parentheses in the "defined" case, which is
very common for calls to "defined" in glibc.
(Function-like macro definitions are a case where you *can't* have the
space because the syntax of C requires no space between the name of the
macro being defined and the '(' before the list of argument names.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 04/21] ARC: startup and dynamic linking code
2018-12-18 23:31 ` Joseph Myers
@ 2018-12-19 1:19 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 1:19 UTC (permalink / raw)
To: Joseph Myers; +Cc: linux-snps-arc, libc-alpha
On 12/18/18 3:24 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> +/*
>> + * Dynamic Linking ABI for ARCv2 ISA
>> + *
> glibc does not use leading '*' on each line of a comment (needs fixing
> throughout this file).
OK !
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 03/21] ARC: ABI Implementation
2018-12-18 23:11 ` Joseph Myers
@ 2018-12-19 2:39 ` Vineet Gupta
2018-12-19 17:58 ` Joseph Myers
2019-01-28 23:04 ` ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation) Vineet Gupta
1 sibling, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 2:39 UTC (permalink / raw)
To: Joseph Myers; +Cc: linux-snps-arc, libc-alpha
On 12/18/18 3:09 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> +/* FLAG 1 is privilege mode only instruction, hence will crash any program */
>
> Generally, throughout the port, make sure comments end ". " (full stop,
> two spaces, end of comment). I won't remark on other places with this
> formatting issue.
OK. Fixed series wide.
>> diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S
>
> As a new port I think it would be best to use init_array in your Implies
> file so you don't need these crti / crtn files, and make GCC generate
> init_array / fini_array exclusively. (See RISC-V and C-Sky discussions of
> this issue.)
OK I can try enabling this !
>> +#ifdef __A7__
>> +#define ARC_PLT_SIZE 12
>> +#else
>> +#define ARC_PLT_SIZE 16
>> +#endif
>
> Except for the multiple-include guards round a whole header file,
> preprocessor directives inside #if should have indentation in glibc, so
> "# define" (and "# define" inside two levels of #if, etc.). (As usual,
> fix this throughout the port; I won't list other individual places with
> this issue.)
Done series wide.
>
>> +#define reloc_index \
>> +({ \
>> + unsigned long plt0 = D_PTR (l, l_info[DT_PLTGOT]); \
>> + unsigned long pltn = reloc_arg; \
>> + /* exclude PL0 and PLT1 */ \
>
> Note the first letter of a comment should be capitalized (in addition to
> ending with ". ").
>
>> + unsigned long idx = (pltn - plt0)/ARC_PLT_SIZE - 2; \
>
> glibc style uses "unsigned long int", not just "unsigned long".
Done series wide.
>> diff --git a/sysdeps/arc/tls-macros.h b/sysdeps/arc/tls-macros.h
>> new file mode 100644
>> index 000000000000..51855edef6e7
>> --- /dev/null
>> +++ b/sysdeps/arc/tls-macros.h
>> @@ -0,0 +1,29 @@
>> +/* Macros to support TLS testing in times of missing compiler support. */
>
> Any file more than ten lines long should have copyright and license
> notices.
Done.
P.S. Is there a lint file or are these style guidelines in wiki somewhere. If not
I can volunteer to capture them in a wiki/readme for future port submissions.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 08/21] ARC: Linux Syscall Interface
2018-12-18 23:38 ` Joseph Myers
@ 2018-12-19 8:16 ` Vineet Gupta
2018-12-19 18:07 ` ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface) Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 8:16 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 3:30 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> +/* Flush cache(s). */
>> +int
>> +_flush_cache (char *addr, const int nbytes, const int op)
>> +{
>> + return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op);
>> +}
>> +weak_alias (_flush_cache, cacheflush)
>
> Can't this use a syscalls.list entry instead of needing its own .c file?
Sure it can ! Done now.
>> diff --git a/sysdeps/unix/sysv/linux/arc/pt-vfork.S b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
>> new file mode 100644
>> index 000000000000..65cc3823ac87
>> --- /dev/null
>> +++ b/sysdeps/unix/sysv/linux/arc/pt-vfork.S
>> @@ -0,0 +1 @@
>> +#include <sysdeps/unix/sysv/linux/alpha/pt-vfork.S>
>
> This does nothing for a new port (it's just defining compat symbols). I'd
> expect
>
> /* Not needed. */
>
> instead, as for RISC-V.
Done !
>> diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c
>
> Why do you need this, rather than using the unified version (possibly with
> a few macros defined first)?
The only syscall ABI requirement is that we pass our our own SA_RESTORER stub
(rather than inject one in kernel, and deal with cache sync etc etc). Indeed the
common code can be used - likely was not the case when I started with ARC port, or
more likely the port that I started ARC port from ;-)
I'll update this.
>> +/* All syscall handler come here to avoid generated code bloat due to
>> + * GOT reference to errno_location or it's equivalent
>> + */
>> +int __syscall_error(int err_no)
>
> Return type goes on a separate line to the function name in a function
> definition.
Oops sorry fixed.
> (This is in addition to the formatting issues that have been
> noted elsewhere in the patch series, of which this code has at least three
> - '*' at start of comment lines, missing '.' at end of comment and missing
> space before '('.)
Sorry again. I can sense your valid frustration, but then a lint file or kernel's
checkpatch style tools ill go a long way. Anyhow for now I've fixed annoyances
(hopefully all of them).
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls
2018-12-18 21:31 ` Vineet Gupta
@ 2018-12-19 8:16 ` Florian Weimer
0 siblings, 0 replies; 99+ messages in thread
From: Florian Weimer @ 2018-12-19 8:16 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
* Vineet Gupta:
> On 12/18/18 1:26 PM, Florian Weimer wrote:
>> This should come in with a sync with a released upstream kernel. Will
>> the port be in Linux 4.20?
>
> linux port was upstreamed in 2013 in v3.9
Ah, right, we add system calls to the lists only for our ports.
Thanks,
Florian
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 03/21] ARC: ABI Implementation
2018-12-19 2:39 ` Vineet Gupta
@ 2018-12-19 17:58 ` Joseph Myers
2018-12-19 20:26 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-19 17:58 UTC (permalink / raw)
To: Vineet Gupta; +Cc: linux-snps-arc, libc-alpha
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> P.S. Is there a lint file or are these style guidelines in wiki
> somewhere. If not I can volunteer to capture them in a wiki/readme for
> future port submissions.
In addition to the GNU Coding Standards (which cover many things such as
comment formatting and spaces before '('), we have
<https://sourceware.org/glibc/wiki/Style_and_Conventions> which discusses
various glibc-specific details. If you find there are points of the style
in glibc which aren't documented in either place, then, yes, it would be a
good idea to add them to the wiki (I just added a few).
Architecture maintainers need wiki accounts in any case (to post test
results for their architectures during every release freeze period), so
you should create an account and post its name so someone can add it to
EditorGroup so you can edit.
Where the formatting issues pointed out exist in some existing code in
glibc, it might also make sense to fix that existing code to follow the
standards more closely so it provides a better example for new code.
However, such formatting changes to existing code may be controversial
(especially for code that originally came from third-party sources using
completely different formatting - though in my view, where such files are
now maintained in glibc without ongoing updates from upstream, we ought to
make the formatting consistent to simplify maintenance).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-19 8:16 ` Vineet Gupta
@ 2018-12-19 18:07 ` Vineet Gupta
2018-12-19 18:28 ` Joseph Myers
2018-12-19 22:10 ` Adhemerval Zanella
0 siblings, 2 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 18:07 UTC (permalink / raw)
To: Joseph Myers; +Cc: Adhemerval Zanella, libc-alpha, linux-snps-arc
On 12/18/18 6:39 PM, Vineet Gupta wrote:
>>> diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c
>> Why do you need this, rather than using the unified version (possibly with
>> a few macros defined first)?
>
> The only syscall ABI requirement is that we pass our our own SA_RESTORER stub
> (rather than inject one in kernel, and deal with cache sync etc etc). Indeed the
> common code can be used - likely was not the case when I started with ARC port, or
> more likely the port that I started ARC port from ;-)
>
> I'll update this.
I took a stab at this but not really happy with taking this approach.
(1). Common code assumes disparate kernel and userland sigaction struct even
though there's no reason for a *new* port to be: its not like all glibc code is
shared/common although I agree it is best to do so as much as possible
So this requires explicit copy over of 1 struct into other, when it could have
been avoided altogether for some cases atleast (!SA_RESTORER).
(2) Linux kernel asm-generic syscall ABI expects sigset_t to be 2 words
| kernel: include/uapi/asm-generic/signal.h
|
| #define _NSIG 64
| typedef struct {
| unsigned long sig[_NSIG_WORDS];
| } sigset_t;
And that is what we pretend at the time of syscall itself, e.g. snippet below from
generic sigaction()
| /* XXX The size argument hopefully will have to be changed to the
| real size of the user-level sigset_t. */
| result = INLINE_SYSCALL_CALL (rt_sigaction, sig,
| act ? &kact : NULL,
| oact ? &koact : NULL, STUB(act) _NSIG / 8);
^^^^^^^^^
However glibc assumes sigset_to to be 128 words which is fine, however the memcpy
for 256 words seems pointless when kernel is not supposed to be even looking at
beyond 2nd word (although I realize my SA_RESTORE case was doing the implicit copy
as well)
(3) Consider me a micro-optimization freak :-) but this memcpy seems waste of
cycles and will atleast show up LMBench lat_sig <install> micro-benchmarks.
I don't have strong feelings either ways, but wanted to express my concerns anyways.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-19 18:07 ` ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface) Vineet Gupta
@ 2018-12-19 18:28 ` Joseph Myers
2018-12-19 22:10 ` Adhemerval Zanella
1 sibling, 0 replies; 99+ messages in thread
From: Joseph Myers @ 2018-12-19 18:28 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Adhemerval Zanella, libc-alpha, linux-snps-arc
On Wed, 19 Dec 2018, Vineet Gupta wrote:
> I took a stab at this but not really happy with taking this approach.
>
> (1). Common code assumes disparate kernel and userland sigaction struct even
> though there's no reason for a *new* port to be: its not like all glibc code is
> shared/common although I agree it is best to do so as much as possible
> So this requires explicit copy over of 1 struct into other, when it could have
> been avoided altogether for some cases atleast (!SA_RESTORER).
So make the generic code optimize those cases based on appropriate
conditionals (making sure to verify those conditionals are right for every
architecture in glibc).
Any new architecture having much architecture-specific code for the kernel
interface in glibc, beyond the basic definitions of how to call a syscall,
is suspect, given that the kernel structures should be consistent across
asm-generic architectures; we ought to make the defaults work so they are
genuinely suitable as defaults for new architectures. This may require
changes to the sysdeps/unix/sysv/linux/ code if it's currently "generic"
to old architectures but not so good for asm-generic ones.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 21/21] NEWS: mention ARC port
2018-12-18 23:49 ` Joseph Myers
@ 2018-12-19 19:11 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 19:11 UTC (permalink / raw)
To: Joseph Myers; +Cc: linux-snps-arc, libc-alpha
On 12/18/18 3:45 PM, Joseph Myers wrote:
> Obviously this belongs under 2.29, or whatever version gets the port, not
> 2.26.
oops, left over from original code, now fixed and beefed up the details a bit.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 09/21] ARC: Linux ABI
2018-12-18 23:44 ` Joseph Myers
@ 2018-12-19 20:20 ` Vineet Gupta
2018-12-19 20:37 ` Joseph Myers
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 20:20 UTC (permalink / raw)
To: Joseph Myers; +Cc: Adhemerval Zanella, libc-alpha, linux-snps-arc
On 12/18/18 3:38 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> +typedef unsigned short int __pr_uid_t;
>> +typedef unsigned short int __pr_gid_t;
>
> Are you sure?
No I'm not :-) There were some interim sweeping changes in this area since when I
started so this might indeed be redundant as you say.
> I don't see an ARC-specific definition of __kernel_uid_t or
> __kernel_gid_t in the Linux kernel at all (which would mean unsigned int
> is actually used and you don't need this header at all).
I'll check.
>> diff --git a/sysdeps/unix/sysv/linux/arc/bits/sigaction.h b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h
>
> I wouldn't expect new architectures to have their own bits/sigaction.h.
> Rather, I'd expect them to use the generic bits/sigaction.h and the
> generic code to convert from the userspace struct sigaction to the kernel
> version.
So this is further to the other thread about generic sigaction (sorry for
cross-post). Indeed with switch to generic sigaction this may not be required.
*However* the layouts of generic userspace sigaction are different from kernel's.
Just to rehash (notes for myself really)
1. user exported struct
struct sigaction
{
__sighandler_t sa_handler;
__sigset_t sa_mask;
int sa_flags;
void (*sa_restorer) (void);
};
2. Linux kernel UAPI struct sigaction / glibc kernel_sigaction
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
__sigrestore_t sa_restorer;
sigset_t sa_mask; /* mask last for extensibility */
};
Since they don't match and we can't possibly change kernel_sigaction, a future
optimization implies changing #1 which has ABI implications at which point it has
diminished or NO returns.
So perhaps we keep the ARC header above, with matching layout, while switching to
generic sigaction() still. OK ?
>> +#ifdef __USE_MISC
>> +# define __ctx(fld) fld
>> +#else
>> +# define __ctx(fld) __ ## fld
>> +#endif
>
> New ports should just use namespace-clean field names here
> unconditionally. The __ctx macros with __USE_MISC conditionals are purely
> for maximum API-compatibility for existing ports that needed to be fixed
> to make them namespace-clean.
OK, fixed this.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 03/21] ARC: ABI Implementation
2018-12-19 17:58 ` Joseph Myers
@ 2018-12-19 20:26 ` Vineet Gupta
2018-12-19 20:40 ` Joseph Myers
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 20:26 UTC (permalink / raw)
To: Joseph Myers, Vineet Gupta; +Cc: linux-snps-arc, libc-alpha
On 12/19/18 9:40 AM, Joseph Myers wrote:
> Architecture maintainers need wiki accounts in any case (to post test
> results for their architectures during every release freeze period), so
> you should create an account and post its name so someone can add it to
> EditorGroup so you can edit.
Created now: VineetGupta
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 10/21] ARC: Linux Startup and Dynamic Loading
2018-12-18 23:52 ` Joseph Myers
@ 2018-12-19 20:30 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 20:30 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 3:49 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> diff --git a/sysdeps/unix/sysv/linux/arc/ldconfig.h b/sysdeps/unix/sysv/linux/arc/ldconfig.h
>
> This header should only be needed if you support multiple ABIs
> simultaneously on the same system; note most architectures don't have it.
> Maybe it will be relevant when you add support for the hard-float ABI, but
> not yet.
Ok removed.
>> +#define SYSDEP_KNOWN_INTERPRETER_NAMES \
>> + { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
>
> That's not the dynamic linker name you're using elsewhere.
Indeed this is leftover from RFC last year. Per your suggestion we changed the
name from ld-linux.so.2 to ld-linux-*arc*.so.2 (reflected in shlib-versions) but
missed here. Fixed now.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start
2018-12-18 21:29 ` Florian Weimer
2018-12-18 22:06 ` Vineet Gupta
@ 2018-12-19 20:36 ` Vineet Gupta
1 sibling, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 20:36 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 1:28 PM, Florian Weimer wrote:
> I think this change and the test suite fixes should be folded into the
> initial addition of these files. Or is there a reason for not doing
> this?
As suggested by other reviewers too, I'm folding all fixes into initial files.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 09/21] ARC: Linux ABI
2018-12-19 20:20 ` Vineet Gupta
@ 2018-12-19 20:37 ` Joseph Myers
2018-12-22 0:53 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-19 20:37 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Adhemerval Zanella, libc-alpha, linux-snps-arc
On Wed, 19 Dec 2018, Vineet Gupta wrote:
> So perhaps we keep the ARC header above, with matching layout, while
> switching to generic sigaction() still. OK ?
If the different userspace layout is better, it should be better for all
future ports as well.
Duplicating all the SA_* constants in architecture-specific headers, even
when those architectures don't actually have different values of those
constants, is bad, especially since there is logic about which __USE_*
macros get which SA_* defined which then needs to be duplicated.
So what this suggests to me is a preliminary patch series to unify
bits/sigaction.h headers - there might be one header for SA_* constants
(architecture-specific variants only when needed), one for SIG_* constants
(architecture-specific variants only when needed), and one for the ways in
which the layout of the userspace struct sigaction can vary (defining
macros that the unified bits/sigaction.h then uses to control the layout -
cf. the siginfo unification a while back).
Initially, the default version of that last header would correspond to the
existing sysdeps/unix/sysv/linux/bits/sigaction.h header - however, if you
get consensus for a different layout as the default for new architectures,
the default would change and all existing architectures that use the
current default layout would get copies of the new bits/ header configured
to keep the old layout. (Variants are possible to reduce the number of
architectures needing architecture-specific copies as a result of the
changed default. For example, you could have the new default only in
sysdeps/unix/sysv/linux/generic not sysdeps/unix/sysv/linux/ and then only
existing asm-generic architectures (aarch64 nios2 riscv) would need to
override back to the old default layout.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 03/21] ARC: ABI Implementation
2018-12-19 20:26 ` Vineet Gupta
@ 2018-12-19 20:40 ` Joseph Myers
0 siblings, 0 replies; 99+ messages in thread
From: Joseph Myers @ 2018-12-19 20:40 UTC (permalink / raw)
To: Vineet Gupta; +Cc: linux-snps-arc, libc-alpha
On Wed, 19 Dec 2018, Vineet Gupta wrote:
> On 12/19/18 9:40 AM, Joseph Myers wrote:
> > Architecture maintainers need wiki accounts in any case (to post test
> > results for their architectures during every release freeze period), so
> > you should create an account and post its name so someone can add it to
> > EditorGroup so you can edit.
>
> Created now: VineetGupta
Added to EditorGroup.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 13/21] ARC: Build Infrastructure
2018-12-18 23:46 ` Joseph Myers
@ 2018-12-19 22:00 ` Vineet Gupta
2018-12-19 22:24 ` Joseph Myers
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 22:00 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 3:44 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> +libc {
>> + GLIBC_2.29 {
>> + __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2;
>> + __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi;
>> + __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi;
>> + __floatdidf; __floatdisf; __floatsidf; __floatsisf;
>> + __floatundidf; __floatundisf; __floatunsidf; __floatunsisf;
>> + __gedf2; __gesf2; __gtdf2; __gtsf2; __ledf2; __lesf2; __ltdf2; __ltsf2;
>> + __muldf3; __mulsf3; __nedf2; __nesf2; __negdf2; __negsf2;
>> + __subdf3; __subsf3; __truncdfsf2; __unorddf2; __unordsf2;
>
> Exporting soft-fp symbols from glibc is only appropriate if you are also
> building soft-fp in glibc (as opposed to building it in libgcc) - which
> might be done with a view to possibly enabling support for exceptions and
> rounding modes for soft-float, as on powerpc soft-float, for example. I
> don't see a Subdirs files containing "soft-fp" in this patch series. If
> you're just linking with libgcc, you should not be re-exporting these
> functions from libc.so (and indeed I don't see them in your ABI baselines
> - libgcc.a has them as hidden symbols to prevent such re-exporting).
Removed now !
>> +libc_cv_fpie=no
> Why?
This likely goes back to my original work on glibc (started somewhere in 2015),
and at the time binutils support for PIE was really shaky (to speak mildly). It
was only in ARC GNU 2016.09 release did we have serious pie fixes due to essential
rewrite of binutils backend by Cuper and Claudiu.
> I'd expect -fpie to be working for all glibc architectures with any
> modern GCC version (I wouldn't expect it to need extra GCC back-end
> support beyond -fpic).
Well at the time there were multiple PIE related issues in binutils rather than gcc.
Indeed with current glibc port, we do build/test/run a bunch of packages relying
on PIE (dumpcap, openssh come to mind) successfully. So yes PIE should work in
general for ARC now. FWIW this could also explain the following current results.
PASS: gmon/tst-gmon-gprof
FAIL: gmon/tst-gmon-pie-gprof
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-19 18:07 ` ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface) Vineet Gupta
2018-12-19 18:28 ` Joseph Myers
@ 2018-12-19 22:10 ` Adhemerval Zanella
2018-12-19 22:26 ` Vineet Gupta
1 sibling, 1 reply; 99+ messages in thread
From: Adhemerval Zanella @ 2018-12-19 22:10 UTC (permalink / raw)
To: Vineet Gupta, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 19/12/2018 15:58, Vineet Gupta wrote:
> On 12/18/18 6:39 PM, Vineet Gupta wrote:
>>>> diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c
>>> Why do you need this, rather than using the unified version (possibly with
>>> a few macros defined first)?
>>
>> The only syscall ABI requirement is that we pass our our own SA_RESTORER stub
>> (rather than inject one in kernel, and deal with cache sync etc etc). Indeed the
>> common code can be used - likely was not the case when I started with ARC port, or
>> more likely the port that I started ARC port from ;-)
>>
>> I'll update this.
>
> I took a stab at this but not really happy with taking this approach.
>
> (1). Common code assumes disparate kernel and userland sigaction struct even
> though there's no reason for a *new* port to be: its not like all glibc code is
> shared/common although I agree it is best to do so as much as possible
> So this requires explicit copy over of 1 struct into other, when it could have
> been avoided altogether for some cases atleast (!SA_RESTORER).
>
> (2) Linux kernel asm-generic syscall ABI expects sigset_t to be 2 words
>
> | kernel: include/uapi/asm-generic/signal.h
> |
> | #define _NSIG 64
> | typedef struct {
> | unsigned long sig[_NSIG_WORDS];
> | } sigset_t;
>
> And that is what we pretend at the time of syscall itself, e.g. snippet below from
> generic sigaction()
>
> | /* XXX The size argument hopefully will have to be changed to the
> | real size of the user-level sigset_t. */
> | result = INLINE_SYSCALL_CALL (rt_sigaction, sig,
> | act ? &kact : NULL,
> | oact ? &koact : NULL, STUB(act) _NSIG / 8);
> ^^^^^^^^^
>
> However glibc assumes sigset_to to be 128 words which is fine, however the memcpy
> for 256 words seems pointless when kernel is not supposed to be even looking at
> beyond 2nd word (although I realize my SA_RESTORE case was doing the implicit copy
> as well)
>
> (3) Consider me a micro-optimization freak :-) but this memcpy seems waste of
> cycles and will atleast show up LMBench lat_sig <install> micro-benchmarks.
>
>
> I don't have strong feelings either ways, but wanted to express my concerns anyways.
>
One possibility is to define an arch-specific __sigset_t.h with a custom
_SIGSET_NWORDS value and add an optimization on Linux sigaction.c to check
if both kernel_sigaction and glibc sigaction share same size and internal
layout to use the struct as-is for syscall instead of copy to a temporary
value (similar to what we used to have on getdents). ARC would still have
arch-specific code and would be the only ABI to have a different sigset_t
though.
However I *hardly* think sigaction is a hotspot in real world cases, usually
the signal action is defined once or in a very limited number of times. I am
not considering synthetic benchmarks, specially lmbench which in most cases
does not measure any useful metric. Even for other sigset_t usage case I still
think an arch-specific definition should not make much difference:
1. setcontext: it would incur just in larger ucontext_t (kernel get/set
mask is done using kernel expected size). Also, taking in consideration
these interfaces were removed from POSIX.1-2008, the inherent performance
issues (signal set/restore will most likely dominate the overhead), and
some implementation issues (BZ#18135 for instance), I would say to not
bother to optimize it.
2. pselect, ppoll, epoll_pwait, posix_spawn (posix_spawnattr_t), sig*:
for functions that accept sigset as an argument it would incur in just
larger memory utilization without much performance overhead. Again,
runtime for these calls would be mostly dominate by syscall overhead
or kernel wait-time for events.
3. raise, etc: for function that might allocate a sigset_t internally it
will similar to 2.
Now, if ARC intention is just to follow generic glibc linux ABI definitions,
it could just define its sigaction as (not tested):
* sysdeps/unix/sysv/linux/arc/sigaction.c
---
#define SA_RESTORER 0x04000000
#include <kernel_sigaction.h>
extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
#define SET_SA_RESTORER(kact, act) \
(kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \
(kact)->sa_restorer = &__default_rt_sa_restorer
#define RESET_SA_RESTORER(act, kact) \
(act)->sa_restorer = (kact)->sa_restorer
static void __default_rt_sa_restorer(void)
{
INTERNAL_SYSCALL_DECL (err);
INTERNAL_SYSCALL_CALL (__NR_rt_sigreturn, err);
}
#include <sysdeps/unix/sysv/linux/sigaction.c>
---
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 16/21] ARC: testsuite fix: sysvipc/*
2018-12-18 21:05 ` [PATCH 16/21] ARC: testsuite fix: sysvipc/* Vineet Gupta
@ 2018-12-19 22:14 ` Adhemerval Zanella
0 siblings, 0 replies; 99+ messages in thread
From: Adhemerval Zanella @ 2018-12-19 22:14 UTC (permalink / raw)
To: libc-alpha
On 18/12/2018 19:04, Vineet Gupta wrote:
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
> ChangeLog | 1 +
> sysdeps/unix/sysv/linux/arc/ipc_priv.h | 21 +++++++++++++++++++++
> 2 files changed, 22 insertions(+)
> create mode 100644 sysdeps/unix/sysv/linux/arc/ipc_priv.h
>
> diff --git a/ChangeLog b/ChangeLog
> index 909b1af09a31..d3a979a9236b 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -109,6 +109,7 @@
> * sysdeps/arc/start.S: likewise.
> * sysdeps/arc/entry.h: Add ENTRY_POINT define check.
> * sysdeps/arc/crti.S: add .hidden annotations.
> + * sysdeps/unix/sysv/linux/arc/ipc_priv.h: New file.
>
> 2018-12-17 Joseph Myers <joseph@codesourcery.com>
>
> diff --git a/sysdeps/unix/sysv/linux/arc/ipc_priv.h b/sysdeps/unix/sysv/linux/arc/ipc_priv.h
> new file mode 100644
> index 000000000000..5f6e9815d169
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/arc/ipc_priv.h
> @@ -0,0 +1,21 @@
> +/* Old SysV permission definition for Linux. ARC version.
> + Copyright (C) 2016-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
> + 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 <sys/ipc.h> /* For __key_t */
> +
> +#define __IPC_64 0x0
>
As a side note, it seems that new ports define __IPC_64 to 0x0. So I think
I will try to clean this up for 2.30 to avoid having all new ports to
redefine it.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 13/21] ARC: Build Infrastructure
2018-12-19 22:00 ` Vineet Gupta
@ 2018-12-19 22:24 ` Joseph Myers
2018-12-21 0:31 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-19 22:24 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Wed, 19 Dec 2018, Vineet Gupta wrote:
> Indeed with current glibc port, we do build/test/run a bunch of packages
> relying on PIE (dumpcap, openssh come to mind) successfully. So yes PIE
> should work in general for ARC now. FWIW this could also explain the
> following current results.
I should note a separate issue to consider: that of *static* PIE support.
That doesn't need to be working, but if it's not working, or if you don't
know whether it's working, when the port goes in you need to update the
list at <https://sourceware.org/glibc/wiki/PortStatus> accordingly. (Port
maintainers need to make sure
<https://sourceware.org/glibc/wiki/PortStatus> and
<https://sourceware.org/glibc/wiki/ABIList> are up to date for their
ports, as well as posting test results on the per-release wiki page during
each release cycle's freeze period.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-19 22:10 ` Adhemerval Zanella
@ 2018-12-19 22:26 ` Vineet Gupta
2018-12-20 12:40 ` Adhemerval Zanella
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 22:26 UTC (permalink / raw)
To: Adhemerval Zanella, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/19/18 2:00 PM, Adhemerval Zanella wrote:
>
>
> One possibility is to define an arch-specific __sigset_t.h with a custom
> _SIGSET_NWORDS value and add an optimization on Linux sigaction.c to check
> if both kernel_sigaction and glibc sigaction share same size and internal
> layout to use the struct as-is for syscall instead of copy to a temporary
> value (similar to what we used to have on getdents). ARC would still have
> arch-specific code and would be the only ABI to have a different sigset_t
> though.
I don't like ARC to single out either. But as Joseph suggests could this be
starting point for arches of future. Assuming it does, would rather see this or
the approach Joseph alluded to earlier [1]
[1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-December/005122.html
>
> However I *hardly* think sigaction is a hotspot in real world cases, usually
> the signal action is defined once or in a very limited number of times. I am
> not considering synthetic benchmarks, specially lmbench which in most cases
> does not measure any useful metric.
I tend to disagree. Coming from embedded linux background, I've found it immensely
useful to compare 2 minimal systems: especially when distos, out-of-box packages,
fancy benchmarks don't even exist.
At any rate, my disagreement with status quo is not so much of optimize for ARC,
but rather pointless spending of electrons. When we know that there are 64 signals
at max, which need 64-bits, why bother shuffling around 1k bits, specially when
one is starting afresh and there's no legacy crap getting in the way.
The case of adding more signals in future is indeed theoretically possible but
that will be an ABI change anyways.
> Even for other sigset_t usage case I still
> think an arch-specific definition should not make much difference:
>
> 1. setcontext: it would incur just in larger ucontext_t (kernel get/set
> mask is done using kernel expected size). Also, taking in consideration
> these interfaces were removed from POSIX.1-2008, the inherent performance
> issues (signal set/restore will most likely dominate the overhead), and
> some implementation issues (BZ#18135 for instance), I would say to not
> bother to optimize it.
>
> 2. pselect, ppoll, epoll_pwait, posix_spawn (posix_spawnattr_t), sig*:
> for functions that accept sigset as an argument it would incur in just
> larger memory utilization without much performance overhead. Again,
> runtime for these calls would be mostly dominate by syscall overhead
> or kernel wait-time for events.
>
> 3. raise, etc: for function that might allocate a sigset_t internally it
> will similar to 2.
I agree that that in libc, pretty much anything will be dominated by syscall
overhead, but still...
> Now, if ARC intention is just to follow generic glibc linux ABI definitions,
> it could just define its sigaction as (not tested):
Indeed the ABI is etched in stone and I have a very similar code now, with slight
difference.
> * sysdeps/unix/sysv/linux/arc/sigaction.c
>
> ---
> #define SA_RESTORER 0x04000000
> #include <kernel_sigaction.h>
>
> extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
>
> #define SET_SA_RESTORER(kact, act) \
> (kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \
> (kact)->sa_restorer = &__default_rt_sa_restorer
+#define SET_SA_RESTORER(kact, act) \
+ ({ \
+ if (!((kact)->sa_flags & SA_RESTORER)) \
+ { \
+ (kact)->sa_restorer = __default_rt_sa_restorer; \
+ (kact)->sa_flags |= SA_RESTORER; \
+ } \
+ else \
+ (kact)->sa_restorer = (act)->sa_restorer; \
+ })
>
> #define RESET_SA_RESTORER(act, kact) \
> (act)->sa_restorer = (kact)->sa_restorer
>
> static void __default_rt_sa_restorer(void)
> {
> INTERNAL_SYSCALL_DECL (err);
> INTERNAL_SYSCALL_CALL (__NR_rt_sigreturn, err);
> }
>
> #include <sysdeps/unix/sysv/linux/sigaction.c>
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-18 23:15 ` Joseph Myers
@ 2018-12-19 23:51 ` Vineet Gupta
2018-12-20 0:52 ` Joseph Myers
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-19 23:51 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 3:11 PM, Joseph Myers wrote:
> Another general point: when posting a new port, could you include pointers
> to architecture and ABI reference manuals in case those are of relevance
> to the review? (URLs going directly to PDFs of those manuals are
> preferred.)
The PRM (Programmer's Reference Manual) is not open source and per corporate
policy requires license agreement, signing NDA...
The ABI doc as of today is not open as well, although I'm checking if we could
share it and if not create equivalent content like some of the other guys on
github etc.
Thx for your understanding.
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-19 23:51 ` Vineet Gupta
@ 2018-12-20 0:52 ` Joseph Myers
2018-12-20 3:03 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-20 0:52 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Wed, 19 Dec 2018, Vineet Gupta wrote:
> On 12/18/18 3:11 PM, Joseph Myers wrote:
> > Another general point: when posting a new port, could you include pointers
> > to architecture and ABI reference manuals in case those are of relevance
> > to the review? (URLs going directly to PDFs of those manuals are
> > preferred.)
>
> The PRM (Programmer's Reference Manual) is not open source and per corporate
> policy requires license agreement, signing NDA...
It's very questionable whether we should consider a port for inclusion in
glibc at all without public architecture documentation (that is,
documentation of instruction semantics; not necessarily documentation of
microarchitectural performance characteristics etc.). Various kinds of
changes can require a developer to refer to documentation across the range
of architectures supported by glibc, if something requires assembly
implementations across architectures (e.g. some of Adhemerval's changes to
thread cancellation; or when I added fegetmode / fesetmode, that required
referring to various architecture documentation to identify what bits
should be considered mode bits, on each architecture where floating-point
status and control bits occupy a single register).
(Non-NDA click-throughs, like the Arm one agreeing not to use the manual
to find if Arm implementations violate any patents, are OK, presuming
there is nothing to restrict public discussion of the contents and using
the information therein to develop free software, although having a direct
URL to the manual without needing such a click-through is certainly
preferred.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-20 0:52 ` Joseph Myers
@ 2018-12-20 3:03 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-20 3:03 UTC (permalink / raw)
To: Joseph Myers; +Cc: Francois Bedard, libc-alpha, linux-snps-arc
On 12/19/18 4:14 PM, Joseph Myers wrote:
> On Wed, 19 Dec 2018, Vineet Gupta wrote:
>
>> On 12/18/18 3:11 PM, Joseph Myers wrote:
>>> Another general point: when posting a new port, could you include pointers
>>> to architecture and ABI reference manuals in case those are of relevance
>>> to the review? (URLs going directly to PDFs of those manuals are
>>> preferred.)
>>
>> The PRM (Programmer's Reference Manual) is not open source and per corporate
>> policy requires license agreement, signing NDA...
>
> It's very questionable whether we should consider a port for inclusion in
> glibc at all without public architecture documentation
IMHO this seems excessive. We've successfully open-sourced significant ports such
as Linux kernel, gcc, binutils etc. gcc atleast deals with instruction semantics
at a much closer level than glibc perse and that didn't get in the way then.
Being an open source developer myself I agree with your reservations, but the
reality is what Ted Tso so nicely put in at [1]
| "It's something I do worry about; and I do share your concern. At the
| same time, the reality is that we are a little like the Old Dutch
| Masters, who had take into account the preference of their patrons
| (i.e., in our case, those who pay our paychecks :-)"
[1] https://lwn.net/Articles/446626/
> (that is,
> documentation of instruction semantics; not necessarily documentation of
> microarchitectural performance characteristics etc.).
I understand the intent is all good faith and justified...
> Various kinds of
> changes can require a developer to refer to documentation across the range
> of architectures supported by glibc, if something requires assembly
> implementations across architectures (e.g. some of Adhemerval's changes to
> thread cancellation; or when I added fegetmode / fesetmode, that required
> referring to various architecture documentation to identify what bits
> should be considered mode bits, on each architecture where floating-point
> status and control bits occupy a single register).
To be honest folks on lkml do sweeping arch changes, PeterZ is one good example
and he has infact changed ARC assembly at times w/o access to PRM. Given the
arrangement we have now, perhaps such changes can call in for review from port
maintainer etc.
> (Non-NDA click-throughs, like the Arm one agreeing not to use the manual
> to find if Arm implementations violate any patents, are OK
No that is not possible: I've discussed this with power may-be in the past and
again today and this is not going to happen.
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-19 22:26 ` Vineet Gupta
@ 2018-12-20 12:40 ` Adhemerval Zanella
2018-12-20 14:43 ` Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 99+ messages in thread
From: Adhemerval Zanella @ 2018-12-20 12:40 UTC (permalink / raw)
To: Vineet Gupta, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 19/12/2018 20:23, Vineet Gupta wrote:
> On 12/19/18 2:00 PM, Adhemerval Zanella wrote:
>>
>>
>> One possibility is to define an arch-specific __sigset_t.h with a custom
>> _SIGSET_NWORDS value and add an optimization on Linux sigaction.c to check
>> if both kernel_sigaction and glibc sigaction share same size and internal
>> layout to use the struct as-is for syscall instead of copy to a temporary
>> value (similar to what we used to have on getdents). ARC would still have
>> arch-specific code and would be the only ABI to have a different sigset_t
>> though.
>
> I don't like ARC to single out either. But as Joseph suggests could this be
> starting point for arches of future. Assuming it does, would rather see this or
> the approach Joseph alluded to earlier [1]
>
> [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-December/005122.html
>
>>
>> However I *hardly* think sigaction is a hotspot in real world cases, usually
>> the signal action is defined once or in a very limited number of times. I am
>> not considering synthetic benchmarks, specially lmbench which in most cases
>> does not measure any useful metric.
>
> I tend to disagree. Coming from embedded linux background, I've found it immensely
> useful to compare 2 minimal systems: especially when distos, out-of-box packages,
> fancy benchmarks don't even exist.
>
> At any rate, my disagreement with status quo is not so much of optimize for ARC,
> but rather pointless spending of electrons. When we know that there are 64 signals
> at max, which need 64-bits, why bother shuffling around 1k bits, specially when
> one is starting afresh and there's no legacy crap getting in the way.
>
> The case of adding more signals in future is indeed theoretically possible but
> that will be an ABI change anyways.
The only advantage of using a larger sigset_t from glibc standpoint is if
kernel ever change it maximum number of supported signals it would not be
a ABI change (it would be if glibc provided sigset_t need to be extended).
My point was that this change would hardly help in performance or memory
utilization due the signal set common utilization in exported and internal
API. But at the same time the signal set hasn't been changed for a *long* time
and I don't see indication that it will any time soon. So a new architecture
might indeed assume it won't change and set its default to follow Linux user
ABI.
>
>> Even for other sigset_t usage case I still
>> think an arch-specific definition should not make much difference:
>>
>> 1. setcontext: it would incur just in larger ucontext_t (kernel get/set
>> mask is done using kernel expected size). Also, taking in consideration
>> these interfaces were removed from POSIX.1-2008, the inherent performance
>> issues (signal set/restore will most likely dominate the overhead), and
>> some implementation issues (BZ#18135 for instance), I would say to not
>> bother to optimize it.
>>
>> 2. pselect, ppoll, epoll_pwait, posix_spawn (posix_spawnattr_t), sig*:
>> for functions that accept sigset as an argument it would incur in just
>> larger memory utilization without much performance overhead. Again,
>> runtime for these calls would be mostly dominate by syscall overhead
>> or kernel wait-time for events.
>>
>> 3. raise, etc: for function that might allocate a sigset_t internally it
>> will similar to 2.
>
> I agree that that in libc, pretty much anything will be dominated by syscall
> overhead, but still...
>
>
>> Now, if ARC intention is just to follow generic glibc linux ABI definitions,
>> it could just define its sigaction as (not tested):
>
> Indeed the ABI is etched in stone and I have a very similar code now, with slight
> difference.
>
>> * sysdeps/unix/sysv/linux/arc/sigaction.c
>>
>> ---
>> #define SA_RESTORER 0x04000000
>> #include <kernel_sigaction.h>
>>
>> extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
>>
>> #define SET_SA_RESTORER(kact, act) \
>> (kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \
>> (kact)->sa_restorer = &__default_rt_sa_restorer
>
> +#define SET_SA_RESTORER(kact, act) \
> + ({ \
> + if (!((kact)->sa_flags & SA_RESTORER)) \
> + { \
> + (kact)->sa_restorer = __default_rt_sa_restorer; \
> + (kact)->sa_flags |= SA_RESTORER; \
> + } \
> + else \
> + (kact)->sa_restorer = (act)->sa_restorer; \
> + })
What is so special about ARC sa_restorer that an application should provide
an specialized one? Can't it follow other abi where they issue __NR_sigreturn
for !SA_SIGINFO or __NR_rt_sigreturn otherwise?
As for other architecture I do think we should hide the sa_restorer usage
from application.
>
>>
>> #define RESET_SA_RESTORER(act, kact) \
>> (act)->sa_restorer = (kact)->sa_restorer
>>
>> static void __default_rt_sa_restorer(void)
>> {
>> INTERNAL_SYSCALL_DECL (err);
>> INTERNAL_SYSCALL_CALL (__NR_rt_sigreturn, err);
>> }
>>
>> #include <sysdeps/unix/sysv/linux/sigaction.c>
>
>
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 12:40 ` Adhemerval Zanella
@ 2018-12-20 14:43 ` Arnd Bergmann
2018-12-20 20:40 ` Vineet Gupta
2018-12-20 15:22 ` Florian Weimer
2018-12-20 20:06 ` Vineet Gupta
2 siblings, 1 reply; 99+ messages in thread
From: Arnd Bergmann @ 2018-12-20 14:43 UTC (permalink / raw)
To: Adhemerval Zanella
Cc: Vineet Gupta, Joseph Myers, GNU C Library,
open list:SYNOPSYS ARC ARCHITECTURE
On Thu, Dec 20, 2018 at 12:19 PM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
> On 19/12/2018 20:23, Vineet Gupta wrote:
> > On 12/19/18 2:00 PM, Adhemerval Zanella wrote:
> >> One possibility is to define an arch-specific __sigset_t.h with a custom
> >> _SIGSET_NWORDS value and add an optimization on Linux sigaction.c to check
> >> if both kernel_sigaction and glibc sigaction share same size and internal
> >> layout to use the struct as-is for syscall instead of copy to a temporary
> >> value (similar to what we used to have on getdents). ARC would still have
> >> arch-specific code and would be the only ABI to have a different sigset_t
> >> though.
> >
> > I don't like ARC to single out either. But as Joseph suggests could this be
> > starting point for arches of future. Assuming it does, would rather see this or
> > the approach Joseph alluded to earlier [1]
> >
> > [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-December/005122.html
> >
> >>
> >> However I *hardly* think sigaction is a hotspot in real world cases, usually
> >> the signal action is defined once or in a very limited number of times. I am
> >> not considering synthetic benchmarks, specially lmbench which in most cases
> >> does not measure any useful metric.
> >
> > I tend to disagree. Coming from embedded linux background, I've found it immensely
> > useful to compare 2 minimal systems: especially when distos, out-of-box packages,
> > fancy benchmarks don't even exist.
> >
> > At any rate, my disagreement with status quo is not so much of optimize for ARC,
> > but rather pointless spending of electrons. When we know that there are 64 signals
> > at max, which need 64-bits, why bother shuffling around 1k bits, specially when
> > one is starting afresh and there's no legacy crap getting in the way.
> >
> > The case of adding more signals in future is indeed theoretically possible but
> > that will be an ABI change anyways.
>
> The only advantage of using a larger sigset_t from glibc standpoint is if
> kernel ever change it maximum number of supported signals it would not be
> a ABI change (it would be if glibc provided sigset_t need to be extended).
>
> My point was that this change would hardly help in performance or memory
> utilization due the signal set common utilization in exported and internal
> API. But at the same time the signal set hasn't been changed for a *long* time
> and I don't see indication that it will any time soon. So a new architecture
> might indeed assume it won't change and set its default to follow Linux user
> ABI.
I just checked again what we actually use in the kernel.
With very few exceptions, all architectures in current kernels use
#define _NSIG 64
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
typedef struct {
/* this sucks for big-endian 32-bit compat mode */
unsigned long sig[_NSIG_WORDS];
} sigset_t;
The only two exceptions I see are:
- alpha uses a scalar 'unsigned long' instead of the struct+array, but
the effect is the same layout.
- For unknown reasons, all three MIPS ABIs now use _NSIG=128.
This changed during linux-2.1.x from 65, to 32 and then the current
value...
All users of sigset_t that I could find in the kernel just check
the size argument to ensure it matches _NSIG, and return
EINVAL otherwise.
Arnd
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 12:40 ` Adhemerval Zanella
2018-12-20 14:43 ` Arnd Bergmann
@ 2018-12-20 15:22 ` Florian Weimer
2018-12-20 19:25 ` Vineet Gupta
2018-12-20 20:06 ` Vineet Gupta
2 siblings, 1 reply; 99+ messages in thread
From: Florian Weimer @ 2018-12-20 15:22 UTC (permalink / raw)
To: Adhemerval Zanella; +Cc: Vineet Gupta, Joseph Myers, libc-alpha, linux-snps-arc
* Adhemerval Zanella:
> The only advantage of using a larger sigset_t from glibc standpoint is if
> kernel ever change it maximum number of supported signals it would not be
> a ABI change (it would be if glibc provided sigset_t need to be extended).
It's not just the kernel. We might want to restore additional state in
sigsetjmp, and historically, the excess signal space in sigset_t has
provided a way to do that even if there is no other space left in the
jump buffer.
Thanks,
Florian
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 15:22 ` Florian Weimer
@ 2018-12-20 19:25 ` Vineet Gupta
2019-01-03 13:10 ` Florian Weimer
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-20 19:25 UTC (permalink / raw)
To: Florian Weimer, Adhemerval Zanella
Cc: Joseph Myers, libc-alpha, linux-snps-arc
On 12/20/18 4:40 AM, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> The only advantage of using a larger sigset_t from glibc standpoint is if
>> kernel ever change it maximum number of supported signals it would not be
>> a ABI change (it would be if glibc provided sigset_t need to be extended).
> It's not just the kernel. We might want to restore additional state in
> sigsetjmp, and historically, the excess signal space in sigset_t has
> provided a way to do that even if there is no other space left in the
> jump buffer.
And that additional state is architectural state (more FPU regs etc etc) or
something libc generic. On both counts, that doesn't sound like a clean interface
design !
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 12:40 ` Adhemerval Zanella
2018-12-20 14:43 ` Arnd Bergmann
2018-12-20 15:22 ` Florian Weimer
@ 2018-12-20 20:06 ` Vineet Gupta
2018-12-20 20:46 ` Adhemerval Zanella
2 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-20 20:06 UTC (permalink / raw)
To: Adhemerval Zanella, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/20/18 3:19 AM, Adhemerval Zanella wrote:
>>> #define SET_SA_RESTORER(kact, act) \
>>> (kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \
>>> (kact)->sa_restorer = &__default_rt_sa_restorer
>> +#define SET_SA_RESTORER(kact, act) \
>> + ({ \
>> + if (!((kact)->sa_flags & SA_RESTORER)) \
>> + { \
>> + (kact)->sa_restorer = __default_rt_sa_restorer; \
>> + (kact)->sa_flags |= SA_RESTORER; \
>> + } \
>> + else \
>> + (kact)->sa_restorer = (act)->sa_restorer; \
>> + })
> What is so special about ARC sa_restorer that an application should provide
> an specialized one?
Its the other way around. Only if application provides it's own restorer, we honor
it, otherwise default restorer is used. This logic goes back many many years ago
to how ARC uClibc did this and likely inherited it from the port it was copied
from. But I don't know if say POSIX allows apps to provide their own restorer or
not. We could very well remove it; although per other discussion if we intend to
use the same struct sigaction for kernel/userland, the placeholder would exist and
we could choose to just ignore it.
> Can't it follow other abi where they issue __NR_sigreturn
> for !SA_SIGINFO or __NR_rt_sigreturn otherwise?
With Linux UAPI ABI, __NR_sigreturn doesn't exist, but your concern is about
restorer ?
> As for other architecture I do think we should hide the sa_restorer usage
> from application.
As mentioned above, the placeholder could exist, we can choose to ignore it.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 14:43 ` Arnd Bergmann
@ 2018-12-20 20:40 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-20 20:40 UTC (permalink / raw)
To: Arnd Bergmann, Adhemerval Zanella
Cc: Joseph Myers, GNU C Library, open list:SYNOPSYS ARC ARCHITECTURE
On 12/20/18 4:07 AM, Arnd Bergmann wrote:
> All users of sigset_t that I could find in the kernel just check
> the size argument to ensure it matches _NSIG, and return
> EINVAL otherwise.
Indeed that was one of the very first problem ARC glibc port ran into with stock
sizeof(sigset_t) passed in sigaction syscall.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 20:06 ` Vineet Gupta
@ 2018-12-20 20:46 ` Adhemerval Zanella
2018-12-20 21:23 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Adhemerval Zanella @ 2018-12-20 20:46 UTC (permalink / raw)
To: Vineet Gupta, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 20/12/2018 17:23, Vineet Gupta wrote:
> On 12/20/18 3:19 AM, Adhemerval Zanella wrote:
>>>> #define SET_SA_RESTORER(kact, act) \
>>>> (kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \
>>>> (kact)->sa_restorer = &__default_rt_sa_restorer
>>> +#define SET_SA_RESTORER(kact, act) \
>>> + ({ \
>>> + if (!((kact)->sa_flags & SA_RESTORER)) \
>>> + { \
>>> + (kact)->sa_restorer = __default_rt_sa_restorer; \
>>> + (kact)->sa_flags |= SA_RESTORER; \
>>> + } \
>>> + else \
>>> + (kact)->sa_restorer = (act)->sa_restorer; \
>>> + })
>> What is so special about ARC sa_restorer that an application should provide
>> an specialized one?
>
> Its the other way around. Only if application provides it's own restorer, we honor
> it, otherwise default restorer is used. This logic goes back many many years ago
> to how ARC uClibc did this and likely inherited it from the port it was copied
> from. But I don't know if say POSIX allows apps to provide their own restorer or
> not. We could very well remove it; although per other discussion if we intend to
> use the same struct sigaction for kernel/userland, the placeholder would exist and
> we could choose to just ignore it.
>
The 'should' should be indeed 'might' in my question. And SA_RESTORER is a Linux
specific ABI not intended to be used by applications, so my question is in fact
what kind of specialized sa_restorer applications might provided that would
require the libc to honour it.
The placeholder existence is not an issue itself (POSIX states the minimum
fields sigaction should provide, not its specific fields neither their
layout).
>
>> Can't it follow other abi where they issue __NR_sigreturn
>> for !SA_SIGINFO or __NR_rt_sigreturn otherwise?
>
> With Linux UAPI ABI, __NR_sigreturn doesn't exist, but your concern is about
> restorer ?
Right, so ARC at least is not pulling old compat stuff. Is it safe to just zero
the sa_restorer for sa_flags without SA_RESTORER?
>
>> As for other architecture I do think we should hide the sa_restorer usage
>> from application.
>
> As mentioned above, the placeholder could exist, we can choose to ignore it.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 20:46 ` Adhemerval Zanella
@ 2018-12-20 21:23 ` Vineet Gupta
2018-12-21 14:32 ` Adhemerval Zanella
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-20 21:23 UTC (permalink / raw)
To: Adhemerval Zanella, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/20/18 12:06 PM, Adhemerval Zanella wrote:
>
>
> On 20/12/2018 17:23, Vineet Gupta wrote:
>> On 12/20/18 3:19 AM, Adhemerval Zanella wrote:
>>>>> #define SET_SA_RESTORER(kact, act) \
>>>>> (kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \
>>>>> (kact)->sa_restorer = &__default_rt_sa_restorer
>>>> +#define SET_SA_RESTORER(kact, act) \
>>>> + ({ \
>>>> + if (!((kact)->sa_flags & SA_RESTORER)) \
>>>> + { \
>>>> + (kact)->sa_restorer = __default_rt_sa_restorer; \
>>>> + (kact)->sa_flags |= SA_RESTORER; \
>>>> + } \
>>>> + else \
>>>> + (kact)->sa_restorer = (act)->sa_restorer; \
>>>> + })
>>> What is so special about ARC sa_restorer that an application should provide
>>> an specialized one?
>>
>> Its the other way around. Only if application provides it's own restorer, we honor
>> it, otherwise default restorer is used. This logic goes back many many years ago
>> to how ARC uClibc did this and likely inherited it from the port it was copied
>> from. But I don't know if say POSIX allows apps to provide their own restorer or
>> not. We could very well remove it; although per other discussion if we intend to
>> use the same struct sigaction for kernel/userland, the placeholder would exist and
>> we could choose to just ignore it.
>>
>
> The 'should' should be indeed 'might' in my question. And SA_RESTORER is a Linux
> specific ABI not intended to be used by applications,
What do u mean here. It is ABI between userspace and kernel, but not necessarily
between applications and glibc, although the same "carrier" sa_flags is in play ?
IOW, SA_RESTORER is not intended to be set by applications, but only by glibc ?
> so my question is in fact
> what kind of specialized sa_restorer applications might provided that would
> require the libc to honour it.
Indeed, applications should not be allowed to change it. The exact signature of
default sigreturn is hardwired in signal unwinding etc etc and any deviation from
that is recipe for issues: but like I mentioned I didn't invent that interface for
ARC.
> The placeholder existence is not an issue itself (POSIX states the minimum
> fields sigaction should provide, not its specific fields neither their
> layout).
OK !
>>> Can't it follow other abi where they issue __NR_sigreturn
>>> for !SA_SIGINFO or __NR_rt_sigreturn otherwise?
>>
>> With Linux UAPI ABI, __NR_sigreturn doesn't exist, but your concern is about
>> restorer ?
>
> Right, so ARC at least is not pulling old compat stuff. Is it safe to just zero
> the sa_restorer for sa_flags without SA_RESTORER?
Thing is ARC signal return depends on a restorer. Meaning !SA_RESTORER doesn't
effectively exist (between libc and kernel). We currently honor user provided
value, instead we could simply overwrite it with default_rt_restorer and on the
way out, zero it out to avoid leaking the glibc guts to curious users.
^ permalink raw reply [flat|nested] 99+ messages in thread
* test related questions (was Re: [PATCH 00/21] glibc port to ARC processors)
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
` (22 preceding siblings ...)
2018-12-18 23:15 ` Joseph Myers
@ 2018-12-20 21:54 ` Vineet Gupta
2018-12-20 23:22 ` Joseph Myers
23 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-20 21:54 UTC (permalink / raw)
To: libc-alpha; +Cc: linux-snps-arc
On 12/18/18 1:04 PM, Vineet Gupta wrote:
> (a) build-many-glibcs.py check results are clean
>
> | Summary of test results:
> | 1173 PASS
> | 15 XFAIL
> |
> | PASS: glibcs-arc-linux-gnu check
One of the issues in running build-many incrementally, i.e. "host-libraries",
"compilers" only once but "glibcs" again to quickly test fixes is that for 2nd
run, target c++ compiler is picked up for support/links-dso-program vs.
links-dso-program-c which fails as the cpp headers are not present. Is there a
solution to that ?
> (b) Full testsuite ran in a cross compile setup using buildroot on HSDK development
> platform.
>
> Summary of test results:
> 24 FAIL
> 5124 PASS
> 27 UNSUPPORTED
> 19 XFAIL
One of the pesky issues with cross testing is localedata/gen-locale.sh kicking on
target, which despite being 1GHz gets in the way of quick iterations. Is there a
way to build those on host and simply reference/install them on target. I
understand this is more of a buildsystem question (buildroot), but any pointers
would be appreciated.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 07/21] ARC: math soft float support
2018-12-19 0:52 ` Joseph Myers
@ 2018-12-20 21:55 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-20 21:55 UTC (permalink / raw)
To: Joseph Myers; +Cc: linux-snps-arc, libc-alpha
On 12/18/18 4:01 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Joseph Myers wrote:
>
>> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>>
>>> +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__)
>> Missing spaces before '(' (should have such spaces in most cases between
>> an identifier or keyword and '(' - calls to "defined", calls to functions,
>> calls to macros, __attribute__, etc. - except for a few cases of calls to
>> macros such as ElfW where the result is logically used like an
>> identifier).
> Or, of course, just omit the parentheses in the "defined" case, which is
> very common for calls to "defined" in glibc.
>
> (Function-like macro definitions are a case where you *can't* have the
> space because the syntax of C requires no space between the name of the
> macro being defined and the '(' before the list of argument names.)
Ok, done !
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: test related questions (was Re: [PATCH 00/21] glibc port to ARC processors)
2018-12-20 21:54 ` test related questions (was Re: [PATCH 00/21] glibc port to ARC processors) Vineet Gupta
@ 2018-12-20 23:22 ` Joseph Myers
0 siblings, 0 replies; 99+ messages in thread
From: Joseph Myers @ 2018-12-20 23:22 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Thu, 20 Dec 2018, Vineet Gupta wrote:
> On 12/18/18 1:04 PM, Vineet Gupta wrote:
> > (a) build-many-glibcs.py check results are clean
> >
> > | Summary of test results:
> > | 1173 PASS
> > | 15 XFAIL
> > |
> > | PASS: glibcs-arc-linux-gnu check
>
> One of the issues in running build-many incrementally, i.e. "host-libraries",
> "compilers" only once but "glibcs" again to quickly test fixes is that for 2nd
> run, target c++ compiler is picked up for support/links-dso-program vs.
> links-dso-program-c which fails as the cpp headers are not present. Is there a
> solution to that ?
I'm not aware of that problem. The C++ headers certainly should be
available in the compilers installed by the "compilers" step. My bots
using GCC 7 and 8 branches only rebuild the compilers once a week unless
build-many-glibcs.py itself changes.
> One of the pesky issues with cross testing is localedata/gen-locale.sh
> kicking on target, which despite being 1GHz gets in the way of quick
> iterations. Is there a way to build those on host and simply
> reference/install them on target. I understand this is more of a
> buildsystem question (buildroot), but any pointers would be appreciated.
It's possible to set up an external build system that extracts the list of
locales for testing from localedata/Makefile, builds them using the same
version of localedef built for the build system and appropriate options
for endianness and uint32_t alignment (if necessary) and copies them into
the right places in the glibc build tree before running the glibc tests.
It does have to be the same version of localedef since the binary locale
format can change depending on the glibc version.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 13/21] ARC: Build Infrastructure
2018-12-19 22:24 ` Joseph Myers
@ 2018-12-21 0:31 ` Vineet Gupta
2018-12-21 1:08 ` Joseph Myers
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-21 0:31 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/19/18 2:17 PM, Joseph Myers wrote:
> I should note a separate issue to consider: that of *static* PIE support.
> That doesn't need to be working, but if it's not working,
Aren't there directed test cases for that already ?
PASS: elf/tst-tls1-static
PASS: elf/tst-tls1-static-non-pie
FAIL: gmon/tst-gmon-pie-gprof
I vaguely remember binutils folks fixing some pie issues when above became PASS
> or if you don't
> know whether it's working, when the port goes in you need to update the
> list at <https://sourceware.org/glibc/wiki/PortStatus> accordingly. (Port
> maintainers need to make sure
> <https://sourceware.org/glibc/wiki/PortStatus> and
> <https://sourceware.org/glibc/wiki/ABIList> are up to date for their
> ports, as well as posting test results on the per-release wiki page during
> each release cycle's freeze period.)
Will do when we get there :-)
Thx,
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 13/21] ARC: Build Infrastructure
2018-12-21 0:31 ` Vineet Gupta
@ 2018-12-21 1:08 ` Joseph Myers
2019-01-29 23:37 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-21 1:08 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Thu, 20 Dec 2018, Vineet Gupta wrote:
> On 12/19/18 2:17 PM, Joseph Myers wrote:
> > I should note a separate issue to consider: that of *static* PIE support.
> > That doesn't need to be working, but if it's not working,
>
> Aren't there directed test cases for that already ?
>
> PASS: elf/tst-tls1-static
> PASS: elf/tst-tls1-static-non-pie
> FAIL: gmon/tst-gmon-pie-gprof
The key point on the PortStatus page is "If linker can correctly generate
static PIE, glibc test results should be identical with and without
--enable-static-pie.". You need to test a build configured with
--enable-static-pie to see if this is fully working.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 07/21] ARC: math soft float support
2018-12-18 23:24 ` Joseph Myers
2018-12-19 0:52 ` Joseph Myers
@ 2018-12-21 1:21 ` Vineet Gupta
2018-12-21 1:24 ` Joseph Myers
1 sibling, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-21 1:21 UTC (permalink / raw)
To: Joseph Myers; +Cc: Claudiu Zissulescu, libc-alpha, linux-snps-arc
On 12/18/18 3:23 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> +#if defined(__ARC_FPU_SP__) || defined(__ARC_FPU_DP__)
>
> Missing spaces before '(' (should have such spaces in most cases between
> an identifier or keyword and '(' - calls to "defined", calls to functions,
> calls to macros, __attribute__, etc. - except for a few cases of calls to
> macros such as ElfW where the result is logically used like an
> identifier).
OK, I removed the parens in this case (update: removed the guard altogether, see
below).
>> +/* In the soft-float case, only rounding to nearest is supported, with
>> + no exceptions. */
>
> To confirm: hard-float and soft-float are always different ABIs; you don't
> support hard-float compilation using the soft-float function calling ABI
> (like is supported for ARM and RISC-V, for example)?
I'm still ramping up on hard-float, so pardon some of my naivety. It seems the
function calling convention is no different for soft-float vs. hard-float. We have
a single register file (hard FP instructions inherently use an additional
accumulator but that isn't really passed around so doesn't affect calling
convention). Other than that SP values go normally in a reg, DP go in reg pair
just as any 64bit value.
OTOH, the ARC libgcc float emulation code seems likely to be limited in terms of
rounding modes supported etc (the current code is dense math implemented in ARC
assembly (really not my cup of coffee) so I couldn't be sure :-(
At any rate, assuming it did limit the rounding modes etc, does that also lend
into the ABI we are talking about here ? Likely not.
> (If you support
> hard-float compilation with the soft-float ABI, it would be problematic to
> have different FE_TONEAREST values in the two cases - ARM and RISC-V both
> define all the FE_* macros independently of whether hard or soft float is
> used, because they support that case.)
I'd much rather have them be the same. The fenv.h I started with didn't
distinguish these (well it only had 1 rounding mode: FE_TONEAREST so was bogus at
best). When I revered it up, I added the various modes etc w/o the header guard
and ho behold all the math tests started failing. My knee jerk response was to
segregate them which likely papered over the issue.
>> diff --git a/sysdeps/arc/math_private.h b/sysdeps/arc/math_private.h
>
> This file should not be needed now.
Ok deleted.
>> diff --git a/sysdeps/arc/nofpu/math-tests-exception.h b/sysdeps/arc/nofpu/math-tests-exception.h
>
> This file does nothing (the name is wrong, the name actually used is
> math-tests-exceptions.h). And it should not be needed unless you support
> hard-float compilation with the soft-float ABI (and thus define all the
> FE_* names in bits/fenv.h even for soft-float).
File renamed and retained.
>> diff --git a/sysdeps/arc/nofpu/math-tests-rounding.h b/sysdeps/arc/nofpu/math-tests-rounding.h
>
> Again, not needed unless hard-float compilation with the soft-float ABI is
> supported and bits/fenv.h has corresponding contents.
ditto !
Now trying a rebuilt with these changes !
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 07/21] ARC: math soft float support
2018-12-21 1:21 ` Vineet Gupta
@ 2018-12-21 1:24 ` Joseph Myers
0 siblings, 0 replies; 99+ messages in thread
From: Joseph Myers @ 2018-12-21 1:24 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Claudiu Zissulescu, libc-alpha, linux-snps-arc
On Thu, 20 Dec 2018, Vineet Gupta wrote:
> I'm still ramping up on hard-float, so pardon some of my naivety. It seems the
> function calling convention is no different for soft-float vs. hard-float. We have
> a single register file (hard FP instructions inherently use an additional
> accumulator but that isn't really passed around so doesn't affect calling
> convention). Other than that SP values go normally in a reg, DP go in reg pair
> just as any 64bit value.
If you have only a single register file and the same calling convention -
and all struct layouts etc. are also the same - then indeed that would be
a single ABI (meaning that you only need one dynamic linker name for ARC
rather than two, if you only support one endianness). (On architectures
with separate register files, jmp_buf, ucontext etc. might sometimes
differ between hard and soft float, although often the space is still
there in the soft-float case, just not used.)
The ARM and RISC-V cases are ones where there are separate hard-float and
soft-float calling conventions - but *also* support for using hardware
floating point with the soft-float calling convention.
If you do have a single ABI, that indicates having bits/fenv.h contents
unconditional (because a soft-float compilation might legitimately end up
linking with a hard-float libm) - and thus indeed needing the internal
headers to disable certain math tests for soft-float. fpu_control.h
contents would still be conditional, however.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-19 0:02 ` Joseph Myers
@ 2018-12-21 3:28 ` Vineet Gupta
2018-12-21 15:29 ` Joseph Myers
0 siblings, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2018-12-21 3:28 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 3:52 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> At any rate, the generated code will likely be different for -Os and otherwise,
>> does that mean entries get added conditionally to localplt.data etc ?
>
> Entries *can* have a "?" to indicate they are optional
OK.
> (although avoiding
> the PLT reference is better - see how include/string.h does asm
> redirection of mempcpy and stpcpy, or likewise in
> sysdeps/wordsize-32/divdi3-symbol-hacks.h, for example).
In libc.so, the extra PLT entry for memcpy
| 00106034 00047837 R_ARC_JMP_SLOT 00066d5c memcpy@@GLIBC_2.27 + 0
|
...
| 1bec8: ld r12,[pcl,0xea16c] ;106034 <memcpy@@GLIBC_2.27+0x9f2d8>
| 1bed0: j.d [r12]
| 1bed4: mov r12,pcl
is due to linkage of a generic libgcc routine fp-bit.c
| 000d79c4 <_fpadd_parts>:
|...
| d7a1a: bl -768848 ;1bec8 <.plt+0xd0>
|
that in turn is likely due to struct assignment in the routine
|static const fp_number_type *
|_fpadd_parts (fp_number_type * a,
| fp_number_type * b,
| fp_number_type * tmp)
|{
| ...
| if (iszero (a))
| {
| *tmp = *a;
So this is classic case of gcc -Os in action, generating a memcpy vs. in-place
LD/ST based copy.
So I guess we just add "?" to localplt.data
>> ARC historically has supported both LE/BE, but we are kind of moving
>> away from BE and as far as I know, there's no-one actively working with
>> BE (except 1 specific customer with legact cores). It is safe to assume
>> we won't support BE and this is sort of easier said for ARC processors
>> as they have many many hardware config knobs and not all are supported
>> for Linux usecase, so BE can be considered as such.
>
> In that case, there should be a #error in bits/endian.h, or a
> configure-time error, or something like that, to make clear the glibc port
> does not support BE.
OK, I'll add that.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 21:23 ` Vineet Gupta
@ 2018-12-21 14:32 ` Adhemerval Zanella
2019-01-09 21:50 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Adhemerval Zanella @ 2018-12-21 14:32 UTC (permalink / raw)
To: Vineet Gupta, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 20/12/2018 18:46, Vineet Gupta wrote:
> On 12/20/18 12:06 PM, Adhemerval Zanella wrote:
>>
>>
>> On 20/12/2018 17:23, Vineet Gupta wrote:
>>> On 12/20/18 3:19 AM, Adhemerval Zanella wrote:
>>>>>> #define SET_SA_RESTORER(kact, act) \
>>>>>> (kact)->sa_flags = (act)->sa_flags | SA_RESTORER; \
>>>>>> (kact)->sa_restorer = &__default_rt_sa_restorer
>>>>> +#define SET_SA_RESTORER(kact, act) \
>>>>> + ({ \
>>>>> + if (!((kact)->sa_flags & SA_RESTORER)) \
>>>>> + { \
>>>>> + (kact)->sa_restorer = __default_rt_sa_restorer; \
>>>>> + (kact)->sa_flags |= SA_RESTORER; \
>>>>> + } \
>>>>> + else \
>>>>> + (kact)->sa_restorer = (act)->sa_restorer; \
>>>>> + })
>>>> What is so special about ARC sa_restorer that an application should provide
>>>> an specialized one?
>>>
>>> Its the other way around. Only if application provides it's own restorer, we honor
>>> it, otherwise default restorer is used. This logic goes back many many years ago
>>> to how ARC uClibc did this and likely inherited it from the port it was copied
>>> from. But I don't know if say POSIX allows apps to provide their own restorer or
>>> not. We could very well remove it; although per other discussion if we intend to
>>> use the same struct sigaction for kernel/userland, the placeholder would exist and
>>> we could choose to just ignore it.
>>>
>>
>> The 'should' should be indeed 'might' in my question. And SA_RESTORER is a Linux
>> specific ABI not intended to be used by applications,
>
> What do u mean here. It is ABI between userspace and kernel, but not necessarily
> between applications and glibc, although the same "carrier" sa_flags is in play ?
> IOW, SA_RESTORER is not intended to be set by applications, but only by glibc ?
AFAIK SA_RESTORER is meant to be used by libc or alike environments to setup
the required code to handle signal handling, it should not be up to programs
to mess up with sa_restorer to provide custom routines.
>
>> so my question is in fact
>> what kind of specialized sa_restorer applications might provided that would
>> require the libc to honour it.
>
> Indeed, applications should not be allowed to change it. The exact signature of
> default sigreturn is hardwired in signal unwinding etc etc and any deviation from
> that is recipe for issues: but like I mentioned I didn't invent that interface for
> ARC.
So my suggestion is not allow user code to mess with sa_restore regardless
if sa_flags contain SA_RESTORER. If kernel allows it to be zero in case of
!SA_RESTORER, set it to zero as other architectures. If it requires an
special routine, add an arch-specific one within glibc.
>
>> The placeholder existence is not an issue itself (POSIX states the minimum
>> fields sigaction should provide, not its specific fields neither their
>> layout).
>
> OK !
>
>>>> Can't it follow other abi where they issue __NR_sigreturn
>>>> for !SA_SIGINFO or __NR_rt_sigreturn otherwise?
>>>
>>> With Linux UAPI ABI, __NR_sigreturn doesn't exist, but your concern is about
>>> restorer ?
>>
>> Right, so ARC at least is not pulling old compat stuff. Is it safe to just zero
>> the sa_restorer for sa_flags without SA_RESTORER?
>
> Thing is ARC signal return depends on a restorer. Meaning !SA_RESTORER doesn't
> effectively exist (between libc and kernel). We currently honor user provided
> value, instead we could simply overwrite it with default_rt_restorer and on the
> way out, zero it out to avoid leaking the glibc guts to curious users.
>
Yes, this is what I suggest ARC should do.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-21 3:28 ` Vineet Gupta
@ 2018-12-21 15:29 ` Joseph Myers
2018-12-21 17:49 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-21 15:29 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Fri, 21 Dec 2018, Vineet Gupta wrote:
> is due to linkage of a generic libgcc routine fp-bit.c
I'd suggest moving from fp-bit to soft-fp in libgcc (soft-fp is a lot
faster, see the 2006 GCC Summit proceedings, though of course you may wish
to do your own benchmarking on ARC), which would probably avoid that issue
(though if very concerned about about code size, soft-fp is a bit larger).
But the "?" in localplt.data would still make sense as long as the GCC
versions using fp-bit there are supported for building the ARC glibc port.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 00/21] glibc port to ARC processors
2018-12-21 15:29 ` Joseph Myers
@ 2018-12-21 17:49 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-21 17:49 UTC (permalink / raw)
To: Joseph Myers
Cc: Claudiu Zissulescu, libc-alpha, linux-snps-arc, Joern Rennecke
On 12/21/18 6:32 AM, Joseph Myers wrote:
> On Fri, 21 Dec 2018, Vineet Gupta wrote:
>
>> is due to linkage of a generic libgcc routine fp-bit.c
>
> I'd suggest moving from fp-bit to soft-fp in libgcc (soft-fp is a lot
> faster, see the 2006 GCC Summit proceedings, though of course you may wish
> to do your own benchmarking on ARC), which would probably avoid that issue
It seems the we have "assisted" soft-fp: hand tweaked assembler written originally
by Joern, so he and/or Claudiu can advise on that. Although the asm was tweaked
for prev core/micro-architecture it should likely be faster than generic "C" code
I presume.
> (though if very concerned about about code size, soft-fp is a bit larger).
Not for glibc :-) (uClibc is a different story, but it seems with largers RAMs and
disks size is kind of becoming moot unless deeply embedded.
> But the "?" in localplt.data would still make sense as long as the GCC
> versions using fp-bit there are supported for building the ARC glibc port.
Right, added that already.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints
2018-12-18 21:05 ` [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints Vineet Gupta
2018-12-18 22:59 ` Joseph Myers
@ 2018-12-21 18:55 ` Joseph Myers
2018-12-21 19:21 ` Vineet Gupta
1 sibling, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2018-12-21 18:55 UTC (permalink / raw)
To: Vineet Gupta; +Cc: libc-alpha, linux-snps-arc
On Tue, 18 Dec 2018, Vineet Gupta wrote:
> This corresponds to the version
>
> Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date: Tue Jun 27 16:10:15 2017 +0000
>
> * longlong.h: Remove ns32k support.
It seems odd to update from an out-of-date version of longlong.h, missing
the subsequent RISC-V changes. So I've committed this patch instead to
update to the current version in GCC.
Update longlong.h.
This patch updates longlong.h from GCC. There were no local changes
in glibc (the previous version was identical to the r232143 GCC
version, apart from copyright dates which had been updated in both
places), so this patch makes it identical to the version in GCC again.
Tested for x86_64 and x86. Also tested with build-many-glibcs.py for
its RISC-V configurations, as the glibc architecture with the most
substantial changes in longlong.h in this patch.
2018-12-21 Joseph Myers <joseph@codesourcery.com>
* stdlib/longlong.h: Update from GCC.
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index c7c6977c9f..7f3dc17dc0 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -197,17 +197,17 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "%r" ((USItype) (ah)), \
- "rIJ" ((USItype) (bh)), \
+ "rICal" ((USItype) (bh)), \
"%r" ((USItype) (al)), \
- "rIJ" ((USItype) (bl)))
+ "rICal" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \
: "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \
: "r" ((USItype) (ah)), \
- "rIJ" ((USItype) (bh)), \
+ "rICal" ((USItype) (bh)), \
"r" ((USItype) (al)), \
- "rIJ" ((USItype) (bl)))
+ "rICal" ((USItype) (bl)))
#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
#ifdef __ARC_NORM__
@@ -221,8 +221,8 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
} \
while (0)
#define COUNT_LEADING_ZEROS_0 32
-#endif
-#endif
+#endif /* __ARC_NORM__ */
+#endif /* __arc__ */
#if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__)) \
&& W_TYPE_SIZE == 32
@@ -858,42 +858,6 @@ extern UDItype __umulsidi3 (USItype, USItype);
#endif
#endif /* __mips__ */
-#if defined (__ns32000__) && W_TYPE_SIZE == 32
-#define umul_ppmm(w1, w0, u, v) \
- ({union {UDItype __ll; \
- struct {USItype __l, __h;} __i; \
- } __xx; \
- __asm__ ("meid %2,%0" \
- : "=g" (__xx.__ll) \
- : "%0" ((USItype) (u)), \
- "g" ((USItype) (v))); \
- (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
-#define __umulsidi3(u, v) \
- ({UDItype __w; \
- __asm__ ("meid %2,%0" \
- : "=g" (__w) \
- : "%0" ((USItype) (u)), \
- "g" ((USItype) (v))); \
- __w; })
-#define udiv_qrnnd(q, r, n1, n0, d) \
- ({union {UDItype __ll; \
- struct {USItype __l, __h;} __i; \
- } __xx; \
- __xx.__i.__h = (n1); __xx.__i.__l = (n0); \
- __asm__ ("deid %2,%0" \
- : "=g" (__xx.__ll) \
- : "0" (__xx.__ll), \
- "g" ((USItype) (d))); \
- (r) = __xx.__i.__l; (q) = __xx.__i.__h; })
-#define count_trailing_zeros(count,x) \
- do { \
- __asm__ ("ffsd %2,%0" \
- : "=r" ((USItype) (count)) \
- : "0" ((USItype) 0), \
- "r" ((USItype) (x))); \
- } while (0)
-#endif /* __ns32000__ */
-
/* FIXME: We should test _IBMR2 here when we add assembly support for the
system vendor compilers.
FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good
@@ -1086,7 +1050,57 @@ extern UDItype __umulsidi3 (USItype, USItype);
} while (0)
#endif
-#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
+#if defined(__riscv)
+#ifdef __riscv_mul
+#define __umulsidi3(u,v) ((UDWtype)(UWtype)(u) * (UWtype)(v))
+#define __muluw3(a, b) ((UWtype)(a) * (UWtype)(b))
+#else
+#if __riscv_xlen == 32
+ #define MULUW3 "call __mulsi3"
+#elif __riscv_xlen == 64
+ #define MULUW3 "call __muldi3"
+#else
+#error unsupport xlen
+#endif /* __riscv_xlen */
+/* We rely on the fact that MULUW3 doesn't clobber the t-registers.
+ It can get better register allocation result. */
+#define __muluw3(a, b) \
+ ({ \
+ register UWtype __op0 asm ("a0") = a; \
+ register UWtype __op1 asm ("a1") = b; \
+ asm volatile (MULUW3 \
+ : "+r" (__op0), "+r" (__op1) \
+ : \
+ : "ra", "a2", "a3"); \
+ __op0; \
+ })
+#endif /* __riscv_mul */
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UWtype __x0, __x1, __x2, __x3; \
+ UHWtype __ul, __vl, __uh, __vh; \
+ \
+ __ul = __ll_lowpart (u); \
+ __uh = __ll_highpart (u); \
+ __vl = __ll_lowpart (v); \
+ __vh = __ll_highpart (v); \
+ \
+ __x0 = __muluw3 (__ul, __vl); \
+ __x1 = __muluw3 (__ul, __vh); \
+ __x2 = __muluw3 (__uh, __vl); \
+ __x3 = __muluw3 (__uh, __vh); \
+ \
+ __x1 += __ll_highpart (__x0);/* this can't give carry */ \
+ __x1 += __x2; /* but this indeed can */ \
+ if (__x1 < __x2) /* did we get it? */ \
+ __x3 += __ll_B; /* yes, add it in the proper pos. */ \
+ \
+ (w1) = __x3 + __ll_highpart (__x1); \
+ (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \
+ } while (0)
+#endif /* __riscv */
+
+#if defined(__sh__) && W_TYPE_SIZE == 32
#ifndef __sh1__
#define umul_ppmm(w1, w0, u, v) \
__asm__ ( \
@@ -1159,21 +1173,6 @@ extern UDItype __umulsidi3 (USItype, USItype);
#endif /* __sh__ */
-#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32
-#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
-#define count_leading_zeros(count, x) \
- do \
- { \
- UDItype x_ = (USItype)(x); \
- SItype c_; \
- \
- __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \
- (count) = c_ - 31; \
- } \
- while (0)
-#define COUNT_LEADING_ZEROS_0 32
-#endif
-
#if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \
&& W_TYPE_SIZE == 32
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints
2018-12-21 18:55 ` Joseph Myers
@ 2018-12-21 19:21 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-21 19:21 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/21/18 10:46 AM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> This corresponds to the version
>>
>> Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
>> Date: Tue Jun 27 16:10:15 2017 +0000
>>
>> * longlong.h: Remove ns32k support.
> It seems odd to update from an out-of-date version of longlong.h, missing
> the subsequent RISC-V changes.
Sorry, that was way back when I started the port (not an excuse for sure).
> So I've committed this patch instead to
> update to the current version in GCC.
Thx, a lot. I'll drop this from v2.
> Update longlong.h.
>
> This patch updates longlong.h from GCC. There were no local changes
> in glibc (the previous version was identical to the r232143 GCC
> version, apart from copyright dates which had been updated in both
> places), so this patch makes it identical to the version in GCC again.
>
> Tested for x86_64 and x86. Also tested with build-many-glibcs.py for
> its RISC-V configurations, as the glibc architecture with the most
> substantial changes in longlong.h in this patch.
>
> 2018-12-21 Joseph Myers <joseph@codesourcery.com>
>
> * stdlib/longlong.h: Update from GCC.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 09/21] ARC: Linux ABI
2018-12-19 20:37 ` Joseph Myers
@ 2018-12-22 0:53 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2018-12-22 0:53 UTC (permalink / raw)
To: Joseph Myers; +Cc: Adhemerval Zanella, libc-alpha, linux-snps-arc
On 12/19/18 12:36 PM, Joseph Myers wrote:
> On Wed, 19 Dec 2018, Vineet Gupta wrote:
>
>> So perhaps we keep the ARC header above, with matching layout, while
>> switching to generic sigaction() still. OK ?
>
> If the different userspace layout is better, it should be better for all
> future ports as well.
>
> Duplicating all the SA_* constants in architecture-specific headers, even
> when those architectures don't actually have different values of those
> constants, is bad, especially since there is logic about which __USE_*
> macros get which SA_* defined which then needs to be duplicated.
Totally agree.
> So what this suggests to me is a preliminary patch series to unify
> bits/sigaction.h headers - there might be one header for SA_* constants
> (architecture-specific variants only when needed), one for SIG_* constants
> (architecture-specific variants only when needed), and one for the ways in
> which the layout of the userspace struct sigaction can vary (defining
> macros that the unified bits/sigaction.h then uses to control the layout -
> cf. the siginfo unification a while back).
Actually this can be simplified. Given the asm-generic syscall ABI, we are anyhow
locked into SA_* or SIG_* and kernel side sigaction, the only variant is user
facing struct sigaction. I suppose we could leave it at that given that only 1
syscall sigaction is affected. The bigger bang for the buck will the reduction of
sizeof(sigset_t) - purely from amount of memory any sig* call needs to
read/write/copy.
I'll follow Adhemerval's suggestion of arch-specific __sigset_t.h which seems
doable w/o much pain.
> Initially, the default version of that last header would correspond to the
> existing sysdeps/unix/sysv/linux/bits/sigaction.h header - however, if you
> get consensus for a different layout as the default for new architectures,
> the default would change and all existing architectures that use the
> current default layout would get copies of the new bits/ header configured
> to keep the old layout. (Variants are possible to reduce the number of
> architectures needing architecture-specific copies as a result of the
> changed default. For example, you could have the new default only in
> sysdeps/unix/sysv/linux/generic not sysdeps/unix/sysv/linux/ and then only
> existing asm-generic architectures (aarch64 nios2 riscv) would need to
> override back to the old default layout.)
Yes this will require a needless churn all over, just for 1 syscall.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-20 19:25 ` Vineet Gupta
@ 2019-01-03 13:10 ` Florian Weimer
0 siblings, 0 replies; 99+ messages in thread
From: Florian Weimer @ 2019-01-03 13:10 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Adhemerval Zanella, Joseph Myers, libc-alpha, linux-snps-arc
* Vineet Gupta:
> On 12/20/18 4:40 AM, Florian Weimer wrote:
>> * Adhemerval Zanella:
>>
>>> The only advantage of using a larger sigset_t from glibc standpoint is if
>>> kernel ever change it maximum number of supported signals it would not be
>>> a ABI change (it would be if glibc provided sigset_t need to be extended).
>> It's not just the kernel. We might want to restore additional state in
>> sigsetjmp, and historically, the excess signal space in sigset_t has
>> provided a way to do that even if there is no other space left in the
>> jump buffer.
>
> And that additional state is architectural state (more FPU regs etc
> etc) or something libc generic. On both counts, that doesn't sound
> like a clean interface design !
Sure, setjmp/longjmp is quite horrible as an interface, considering that
register files do evolve. But it's what we have in C, and it's good to
have at least some extension space there (but it could be expressed in a
better way, definitely).
Thanks,
Florian
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface)
2018-12-21 14:32 ` Adhemerval Zanella
@ 2019-01-09 21:50 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2019-01-09 21:50 UTC (permalink / raw)
To: Adhemerval Zanella, Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/21/18 4:05 AM, Adhemerval Zanella wrote:
>> Thing is ARC signal return depends on a restorer. Meaning !SA_RESTORER doesn't
>> effectively exist (between libc and kernel). We currently honor user provided
>> value, instead we could simply overwrite it with default_rt_restorer and on the
>> way out, zero it out to avoid leaking the glibc guts to curious users.
>>
> Yes, this is what I suggest ARC should do.
So I was able to
(1) switch ARC to __sigset_t [2] vs. [128]
(2) create a generic patch to breakout struct sigaction into bits/sigaction-arch.h
(3) update generic __libc_sigaction to avoid itemized copy if sa_mask, sa_flags et
al offsets matched for struct kernel_signal and struct sigaction
(4) create arc/bits/sigaction-arch.h
However it turned out to be futile as the passthru won't work anyways :-(
@act in sigaction(sig, act, oact) is a const and can't be modified in place for
sticking in sa_restorer for kernel, thus needs to be copied over anyways.
This means we have [1] but have to drop [2-4]. Oh well !
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 06/21] ARC: Atomics and Locking primitives
2018-12-18 23:23 ` Joseph Myers
@ 2019-01-15 0:41 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2019-01-15 0:41 UTC (permalink / raw)
To: Joseph Myers; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 3:15 PM, Joseph Myers wrote:
> On Tue, 18 Dec 2018, Vineet Gupta wrote:
>
>> +#define USE_ATOMIC_COMPILER_BUILTINS 0
>
> There is a strong preference for new ports to use 1 for this rather than 0
> (and not to have any asms in their atomic-machine.h unless there's some
> reason use of built-in functions is unsuitable) - see the recently posted
> C-Sky version, for example. If you can't use 1, there should be a good
> reason, documented in a comment, for using asms instead of compiler
> built-in functions (e.g. if the compiler built-in functions would result
> in libatomic dependencies, which are unsuitable for glibc, rather than
> being expanded inline).
I tried switching to builtins and see the resulting differences in generated code:
there's one snafu to begin with: gcc seems to be generating a DMB 0 for the
barriers, which is a no-op, it needs to be DMB {1,2,3} for read, write, control...
so that needs fixing there.
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext
2018-12-18 22:40 ` Andreas Schwab
@ 2019-01-21 22:32 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2019-01-21 22:32 UTC (permalink / raw)
To: Andreas Schwab; +Cc: libc-alpha, linux-snps-arc
On 12/18/18 2:36 PM, Andreas Schwab wrote:
>> ENTRY(__startcontext)
>>
>> + cfi_register (blink, r15)
>> +
> You should precede that with a dummy .cfi_label (see
> sysdeps/riscv/start.S) to force the CFI into the FDE instead of the
> CIE. Also, can you use cfi_undefined instead?
Yes that works as well.
ENTRY (__startcontext)
- cfi_register (blink, r15)
+ .cfi_label .Ldummy
+ cfi_undefined (blink)
00035e14 <__startcontext>:
35e14: jl [r13]
35e18: mov r0,r14
35e1c: breq.nt r0,0,8 ;35e24 <__startcontext+0x10>
35e20: bl -168 ;35d78 <setcontext>
35e24: b -38248 ;2c8bc <exit>
New
----
0000058c 00000010 00000590 FDE cie=00000000 pc=00035e14..00035e28
DW_CFA_undefined: r31
DW_CFA_nop
Old
----
00035df4 <__startcontext>:
35df4: jl [r13]
35df8: mov r0,r14
35dfc: breq.nt r0,0,8 ;35e04 <__startcontext+0x10>
35e00: bl -168 ;35d58 <setcontext>
35e04: b -38248 ;2c89c <exit>
0000058c 00000014 00000000 CIE
Version: 1
Augmentation: "zR"
Code alignment factor: 1
Data alignment factor: -4
Return address column: 31
Augmentation data: 1b
DW_CFA_def_cfa: r28 ofs 0
DW_CFA_register: r31 in r15
DW_CFA_nop
000005a4 00000010 0000001c FDE cie=0000058c pc=00035df4..00035e08
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
^ permalink raw reply [flat|nested] 99+ messages in thread
* ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation)
2018-12-18 23:11 ` Joseph Myers
2018-12-19 2:39 ` Vineet Gupta
@ 2019-01-28 23:04 ` Vineet Gupta
2019-01-28 23:13 ` Joseph Myers
1 sibling, 1 reply; 99+ messages in thread
From: Vineet Gupta @ 2019-01-28 23:04 UTC (permalink / raw)
To: Joseph Myers
Cc: Cupertino Miranda, linux-snps-arc, libc-alpha,
Claudiu Zissulescu, Nick Clifton
On 12/18/18 3:09 PM, Joseph Myers wrote:
>> diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S
> As a new port I think it would be best to use init_array in your Implies
> file so you don't need these crti / crtn files, and make GCC generate
> init_array / fini_array exclusively. (See RISC-V and C-Sky discussions of
> this issue.)
>
I did the switch and while is working, there are additional test failures
| FAIL: dlfcn/bug-atexit1
| FAIL: dlfcn/bug-atexit2
| FAIL: dlfcn/tstatexit
| FAIL: dlfcn/tstcxaatexit
| FAIL: nptl/tst-atfork2
| FAIL: nptl/tst-cond17
| FAIL: stdlib/test-dlclose-exit-race
In the failing case, the dsos are NOT getting the DT_INIT/DT_FINI dynamic tags
Consider glibc test dlfcn/tstatexit, which uses a dso modatexit.so
In good case
| arc-linux-readelf -a modatexit.os
|
| Section Headers:
| [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
| [ 9] .init PROGBITS 0000047c 00047c 000044 00 AX 0 0 4
| [12] .fini PROGBITS 000006f8 0006f8 000028 00 AX 0 0 4
|
| Dynamic section at offset 0x1f08 contains 23 entries:
| 0x0000000c (INIT) 0x47c
| 0x0000000d (FINI) 0x6f8
In broken case, init/fini sections exist, but DT_INI/DT_FINI are missing.
|
| Dynamic section at offset 0x1f2c contains 19 entries: <-- missing INIT/FINI
|
I suspected some bintuils/gcc shenanigans and tried hacking around, but was led
far too astray.
(1). gcc config test failing (false alaram)
| host-gcc-final-ab544139bfee/build/gcc/config.log
|
|configure:22941: checking for .preinit_array/.init_array/.fini_array support
|configure:23106: checking cross compile... guessing
|configure:23111: result: no
gcc was seemingly built w/o init_array support leading to inclusion of default
gcc/config/initfini-array.h
However doing a glibc aarch64 build I see the same output so perhaps it is not
relevant.
(2). ARC binutils port seems to hardwire _init/_fini (and the only arch to do
that) so I ripped out the relevant handling from ld, but that doesn't help.
https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/commit/56771171fa7cb9e31c65e26a656a8588d603d924
So I'm not sure if this is deficiency of linker emulation script or code ld/bfd etc..
-Vineet
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation)
2019-01-28 23:04 ` ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation) Vineet Gupta
@ 2019-01-28 23:13 ` Joseph Myers
2019-01-28 23:43 ` Vineet Gupta
0 siblings, 1 reply; 99+ messages in thread
From: Joseph Myers @ 2019-01-28 23:13 UTC (permalink / raw)
To: Vineet Gupta
Cc: Cupertino Miranda, linux-snps-arc, libc-alpha,
Claudiu Zissulescu, Nick Clifton
On Mon, 28 Jan 2019, Vineet Gupta wrote:
> In the failing case, the dsos are NOT getting the DT_INIT/DT_FINI
> dynamic tags
And they shouldn't be (they should have DT_INIT_ARRAY / DT_FINI_ARRAY
instead).
> (1). gcc config test failing (false alaram)
>
> | host-gcc-final-ab544139bfee/build/gcc/config.log
> |
> |configure:22941: checking for .preinit_array/.init_array/.fini_array support
> |configure:23106: checking cross compile... guessing
> |configure:23111: result: no
>
> gcc was seemingly built w/o init_array support leading to inclusion of default
> gcc/config/initfini-array.h
> However doing a glibc aarch64 build I see the same output so perhaps it is not
> relevant.
This was discussed at length in the C-Sky discussion. In short: the
proper fix is to change that configure test to apply for cross compilation
as well, other than in the very limited case where it tries to run
something (but doing so is not appropriate in the current
regression-fixes-only GCC development stage). You can hack around it with
gcc_cv_initfini_array=yes for the target in config.gcc, as done by a few
architectures. Or you can define the relevant target macros in
gcc/config/<arch>/<something>.h to force init_array / fini_array use
independent of the configure test, as done for AArch64.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation)
2019-01-28 23:13 ` Joseph Myers
@ 2019-01-28 23:43 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2019-01-28 23:43 UTC (permalink / raw)
To: Joseph Myers
Cc: Cupertino Miranda, linux-snps-arc, libc-alpha,
Claudiu Zissulescu, Nick Clifton
On 1/28/19 3:13 PM, Joseph Myers wrote:
> This was discussed at length in the C-Sky discussion. In short: the
> proper fix is to change that configure test to apply for cross compilation
> as well, other than in the very limited case where it tries to run
> something (but doing so is not appropriate in the current
> regression-fixes-only GCC development stage). You can hack around it with
> gcc_cv_initfini_array=yes for the target in config.gcc, as done by a few
> architectures. Or you can define the relevant target macros in
> gcc/config/<arch>/<something>.h to force init_array / fini_array use
> independent of the configure test, as done for AArch64.
Awesome, now I see how it was working for RISCV (config test printed "cached") and
AArch64
I've added a local hack to gcc.config to test things out and will tackle this over
at gcc mailing list.
Many thx for untangling this for me. I found the C-Sky discussion as well [1]
adding a link here for someone else in future who trips on this again.
-Vineet
[1] https://sourceware.org/ml/libc-alpha/2018-11/msg00870.html
^ permalink raw reply [flat|nested] 99+ messages in thread
* Re: [PATCH 13/21] ARC: Build Infrastructure
2018-12-21 1:08 ` Joseph Myers
@ 2019-01-29 23:37 ` Vineet Gupta
0 siblings, 0 replies; 99+ messages in thread
From: Vineet Gupta @ 2019-01-29 23:37 UTC (permalink / raw)
To: Joseph Myers; +Cc: Cupertino Miranda, linux-snps-arc, libc-alpha
On 12/20/18 3:24 PM, Joseph Myers wrote:
> On Thu, 20 Dec 2018, Vineet Gupta wrote:
>
>> On 12/19/18 2:17 PM, Joseph Myers wrote:
>>> I should note a separate issue to consider: that of *static* PIE support.
>>> That doesn't need to be working, but if it's not working,
>>
>> Aren't there directed test cases for that already ?
>>
>> PASS: elf/tst-tls1-static
>> PASS: elf/tst-tls1-static-non-pie
>> FAIL: gmon/tst-gmon-pie-gprof
>
> The key point on the PortStatus page is "If linker can correctly generate
> static PIE, glibc test results should be identical with and without
> --enable-static-pie.". You need to test a build configured with
> --enable-static-pie to see if this is fully working.
Unfortunately this doesn't seem to work.
ld bails out when linking elf/sln. It can't seem to resolve the _DYNAMIC@pcl in
elf_machine_load_address(). We can look into this but presume it is not a deal
breaker.
~/BR/host/bin/arc-buildroot-linux-gnu-gcc
-nostdlib -nostartfiles
*-static*
-o ~/BR/build/glibc-2f9a78f208a7/build/elf/sln
*-static-pie*
~/BR/build/glibc-2f9a78f208a7/build/csu/rcrt1.o
~/BR/build/glibc-2f9a78f208a7/build/csu/crti.o
`~/BR/host/bin/arc-buildroot-linux-gnu-gcc --print-file-name=crtbeginS.o`
~/BR/build/glibc-2f9a78f208a7/build/elf/sln.o
~/BR/build/glibc-2f9a78f208a7/build/elf/static-stubs.o
-Wl,--start-group
~/BR/build/glibc-2f9a78f208a7/build/libc.a -lgcc
-Wl,--end-group
`~/BR/host/bin/arc-buildroot-linux-gnu-gcc --print-file-name=crtendS.o`
~/BR/build/glibc-2f9a78f208a7/build/csu/crtn.o
~/BR/host/lib/gcc/arc-buildroot-linux-gnu/8.2.1/../../../../arc-buildroot-linux-gnu/bin/ld:
~/BR/build/glibc-2f9a78f208a7/build/libc.a(dl-reloc-static-pie.o): in function
`elf_machine_load_address':
~/BR/build:/glibc-2f9a78f208a7/elf/../sysdeps/arc/dl-machine.h:115: undefined
reference to `_DYNAMIC'
~/BR/host/lib/gcc/arc-buildroot-linux-gnu/8.2.1/../../../../arc-buildroot-linux-gnu/bin/ld:
~/BR/build/glibc-2f9a78f208a7/elf/../sysdeps/arc/dl-machine.h:115: undefined
reference to `_DYNAMIC'
collect2: error: ld returned 1 exit status
^ permalink raw reply [flat|nested] 99+ messages in thread
end of thread, other threads:[~2019-01-29 23:37 UTC | newest]
Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18 21:05 [PATCH 00/21] glibc port to ARC processors Vineet Gupta
2018-12-18 21:05 ` [PATCH 16/21] ARC: testsuite fix: sysvipc/* Vineet Gupta
2018-12-19 22:14 ` Adhemerval Zanella
2018-12-18 21:05 ` [PATCH 18/21] ARC: testsuite fix: GD TLS issue Vineet Gupta
2018-12-18 21:05 ` [PATCH 03/21] ARC: ABI Implementation Vineet Gupta
2018-12-18 23:11 ` Joseph Myers
2018-12-19 2:39 ` Vineet Gupta
2018-12-19 17:58 ` Joseph Myers
2018-12-19 20:26 ` Vineet Gupta
2018-12-19 20:40 ` Joseph Myers
2019-01-28 23:04 ` ARC binutils init/fini (was Re: [PATCH 03/21] ARC: ABI Implementation) Vineet Gupta
2019-01-28 23:13 ` Joseph Myers
2019-01-28 23:43 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 20/21] build-many-glibcs.py: Enable ARC builds Vineet Gupta
2018-12-18 21:05 ` [PATCH 12/21] ARC: Update syscall-names.list for ARC specific syscalls Vineet Gupta
2018-12-18 21:28 ` Florian Weimer
2018-12-18 21:31 ` Vineet Gupta
2018-12-19 8:16 ` Florian Weimer
2018-12-18 21:05 ` [PATCH 04/21] ARC: startup and dynamic linking code Vineet Gupta
2018-12-18 23:31 ` Joseph Myers
2018-12-19 1:19 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 05/21] ARC: Thread Local Storage support Vineet Gupta
2018-12-18 21:05 ` [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext Vineet Gupta
2018-12-18 22:40 ` Andreas Schwab
2019-01-21 22:32 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 06/21] ARC: Atomics and Locking primitives Vineet Gupta
2018-12-18 23:23 ` Joseph Myers
2019-01-15 0:41 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 11/21] ARC: ABI lists Vineet Gupta
2018-12-18 22:32 ` Andreas Schwab
2018-12-18 22:36 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 19/21] ARC: fix several unwining and cancelation tests Vineet Gupta
2018-12-18 21:05 ` [PATCH 13/21] ARC: Build Infrastructure Vineet Gupta
2018-12-18 23:46 ` Joseph Myers
2018-12-19 22:00 ` Vineet Gupta
2018-12-19 22:24 ` Joseph Myers
2018-12-21 0:31 ` Vineet Gupta
2018-12-21 1:08 ` Joseph Myers
2019-01-29 23:37 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 21/21] NEWS: mention ARC port Vineet Gupta
2018-12-18 23:49 ` Joseph Myers
2018-12-19 19:11 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 02/21] ARC: add definitions to elf/elf.h Vineet Gupta
2018-12-18 21:05 ` [PATCH 01/21] longlong.h: sync from gcc to fix ARC inline asm constraints Vineet Gupta
2018-12-18 22:59 ` Joseph Myers
2018-12-18 23:11 ` Vineet Gupta
2018-12-21 18:55 ` Joseph Myers
2018-12-21 19:21 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 14/21] ARC: Enable __start as entry point vs. canonical _start Vineet Gupta
2018-12-18 21:29 ` Florian Weimer
2018-12-18 22:06 ` Vineet Gupta
2018-12-18 23:07 ` Joseph Myers
2018-12-18 23:10 ` Vineet Gupta
2018-12-19 20:36 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 09/21] ARC: Linux ABI Vineet Gupta
2018-12-18 23:44 ` Joseph Myers
2018-12-19 20:20 ` Vineet Gupta
2018-12-19 20:37 ` Joseph Myers
2018-12-22 0:53 ` Vineet Gupta
2018-12-18 21:05 ` [PATCH 07/21] ARC: math soft float support Vineet Gupta
2018-12-18 23:24 ` Joseph Myers
2018-12-19 0:52 ` Joseph Myers
2018-12-20 21:55 ` Vineet Gupta
2018-12-21 1:21 ` Vineet Gupta
2018-12-21 1:24 ` Joseph Myers
2018-12-18 21:15 ` [PATCH 08/21] ARC: Linux Syscall Interface Vineet Gupta
2018-12-18 23:38 ` Joseph Myers
2018-12-19 8:16 ` Vineet Gupta
2018-12-19 18:07 ` ARC vs. generic sigaction (was Re: [PATCH 08/21] ARC: Linux Syscall Interface) Vineet Gupta
2018-12-19 18:28 ` Joseph Myers
2018-12-19 22:10 ` Adhemerval Zanella
2018-12-19 22:26 ` Vineet Gupta
2018-12-20 12:40 ` Adhemerval Zanella
2018-12-20 14:43 ` Arnd Bergmann
2018-12-20 20:40 ` Vineet Gupta
2018-12-20 15:22 ` Florian Weimer
2018-12-20 19:25 ` Vineet Gupta
2019-01-03 13:10 ` Florian Weimer
2018-12-20 20:06 ` Vineet Gupta
2018-12-20 20:46 ` Adhemerval Zanella
2018-12-20 21:23 ` Vineet Gupta
2018-12-21 14:32 ` Adhemerval Zanella
2019-01-09 21:50 ` Vineet Gupta
2018-12-18 21:16 ` [PATCH 15/21] ARC: testsuite fix: elf/check-initfini Vineet Gupta
2018-12-18 21:26 ` [PATCH 10/21] ARC: Linux Startup and Dynamic Loading Vineet Gupta
2018-12-18 23:52 ` Joseph Myers
2018-12-19 20:30 ` Vineet Gupta
2018-12-18 22:56 ` [PATCH 00/21] glibc port to ARC processors Joseph Myers
2018-12-18 23:09 ` Vineet Gupta
2018-12-19 0:02 ` Joseph Myers
2018-12-21 3:28 ` Vineet Gupta
2018-12-21 15:29 ` Joseph Myers
2018-12-21 17:49 ` Vineet Gupta
2018-12-18 23:15 ` Joseph Myers
2018-12-19 23:51 ` Vineet Gupta
2018-12-20 0:52 ` Joseph Myers
2018-12-20 3:03 ` Vineet Gupta
2018-12-20 21:54 ` test related questions (was Re: [PATCH 00/21] glibc port to ARC processors) Vineet Gupta
2018-12-20 23:22 ` Joseph Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).