diff options
Diffstat (limited to 'sysdeps/arm')
147 files changed, 1400 insertions, 4286 deletions
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile index 2849aeda42..ad2042b93a 100644 --- a/sysdeps/arm/Makefile +++ b/sysdeps/arm/Makefile @@ -51,11 +51,6 @@ sysdep_routines += $(aeabi_constants) $(aeabi_routines) static-only-routines += $(aeabi_constants) aeabi_read_tp shared-only-routines += libc-aeabi_read_tp -# In order for unwinding to fail when it falls out of main, we need a -# cantunwind marker. There's one in start.S. To make sure we reach it, add -# unwind tables for __libc_start_main. -CFLAGS-libc-start.c += -fexceptions - sysdep_routines += arm-unwind-resume shared-only-routines += arm-unwind-resume endif @@ -64,10 +59,6 @@ ifeq ($(subdir),gmon) sysdep_routines += arm-mcount endif -ifeq ($(subdir),debug) -CFLAGS-backtrace.c += -funwind-tables -endif - ifeq ($(subdir),rt) librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1 rt-arm-unwind-resume diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S index 0f50268693..b2cbbb9e3a 100644 --- a/sysdeps/arm/__longjmp.S +++ b/sysdeps/arm/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for ARM. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -28,8 +28,7 @@ ENTRY (__longjmp) mov ip, r0 #ifdef CHECK_SP - sfi_breg ip, \ - ldr r4, [\B] /* jmpbuf's sp */ + ldr r4, [ip] /* jmpbuf's sp */ cfi_undefined (r4) #ifdef PTR_DEMANGLE PTR_DEMANGLE (r4, r4, a3, a4) @@ -38,28 +37,22 @@ ENTRY (__longjmp) #endif #ifdef PTR_DEMANGLE - sfi_breg ip, \ - ldr a4, [\B], #4 + ldr a4, [ip], #4 PTR_DEMANGLE (a4, a4, a3, r4) cfi_undefined (r4) - sfi_breg ip, \ - ldr r4, [\B], #4 + ldr r4, [ip], #4 PTR_DEMANGLE2 (r4, r4, a3) #else - sfi_breg ip, \ - ldr a4, [\B], #4 - sfi_breg ip, \ - ldr r4, [\B], #4 + ldr a4, [ip], #4 + ldr r4, [ip], #4 cfi_undefined (r4) #endif /* longjmp probe expects longjmp first argument (4@r0), second argument (-4@r1), and target address (4@r4), respectively. */ LIBC_PROBE (longjmp, 3, 4@r0, -4@r1, 4@r4) - sfi_sp \ mov sp, a4 mov lr, r4 - sfi_breg ip, \ - ldmia \B!, JMP_BUF_REGLIST + ldmia ip!, JMP_BUF_REGLIST cfi_restore (v1) cfi_restore (v2) cfi_restore (v3) @@ -97,8 +90,7 @@ ENTRY (__longjmp) /* Restore the VFP registers. */ /* Following instruction is vldmia ip!, {d8-d15}. */ - sfi_breg r12, \ - ldc p11, cr8, [\B], #64 + ldc p11, cr8, [r12], #64 .Lno_vfp: #ifndef ARM_ASSUME_NO_IWMMXT @@ -107,18 +99,12 @@ ENTRY (__longjmp) /* Restore the call-preserved iWMMXt registers. */ /* Following instructions are wldrd wr10, [ip], #8 (etc.) */ - sfi_breg r12, \ - ldcl p1, cr10, [\B], #8 - sfi_breg r12, \ - ldcl p1, cr11, [\B], #8 - sfi_breg r12, \ - ldcl p1, cr12, [\B], #8 - sfi_breg r12, \ - ldcl p1, cr13, [\B], #8 - sfi_breg r12, \ - ldcl p1, cr14, [\B], #8 - sfi_breg r12, \ - ldcl p1, cr15, [\B], #8 + ldcl p1, cr10, [r12], #8 + ldcl p1, cr11, [r12], #8 + ldcl p1, cr12, [r12], #8 + ldcl p1, cr13, [r12], #8 + ldcl p1, cr14, [r12], #8 + ldcl p1, cr15, [r12], #8 .Lno_iwmmxt: #endif diff --git a/sysdeps/arm/add_n.S b/sysdeps/arm/add_n.S index aacc5c1e6f..e8e744c3c0 100644 --- a/sysdeps/arm/add_n.S +++ b/sysdeps/arm/add_n.S @@ -1,5 +1,5 @@ /* mpn_add_n -- add (or subtract) bignums. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -52,40 +52,31 @@ ENTRY (FUNC) add lr, r1, r3, lsl #2 /* compute end src1 */ beq 1f - sfi_breg r1, \ - ldr r4, [\B], #4 /* do one to make count even */ - sfi_breg r2, \ - ldr r5, [\B], #4 + ldr r4, [r1], #4 /* do one to make count even */ + ldr r5, [r2], #4 OPC r4, r4, r5 teq r1, lr /* end of count? (preserve carry) */ - sfi_breg r0, \ - str r4, [\B], #4 + str r4, [r0], #4 beq 9f 1: tst r3, #2 /* count & 2 == 2? */ beq 2f - sfi_breg r1, \ - ldm \B!, { r4, r5 } /* do two to make count 0 mod 4 */ - sfi_breg r2, \ - ldm \B!, { r6, r7 } + ldm r1!, { r4, r5 } /* do two to make count 0 mod 4 */ + ldm r2!, { r6, r7 } OPC r4, r4, r6 OPC r5, r5, r7 teq r1, lr /* end of count? */ - sfi_breg r0, \ - stm \B!, { r4, r5 } + stm r0!, { r4, r5 } beq 9f 2: - sfi_breg r1, \ - ldm \B!, { r3, r5, r7, r10 } /* do four each loop */ - sfi_breg r2, \ - ldm \B!, { r4, r6, r8, ip } + ldm r1!, { r3, r5, r7, r10 } /* do four each loop */ + ldm r2!, { r4, r6, r8, ip } OPC r3, r3, r4 OPC r5, r5, r6 OPC r7, r7, r8 OPC r10, r10, ip teq r1, lr - sfi_breg r0, \ - stm \B!, { r3, r5, r7, r10 } + stm r0!, { r3, r5, r7, r10 } bne 2b 9: diff --git a/sysdeps/arm/addmul_1.S b/sysdeps/arm/addmul_1.S index f39dd14637..40d873690e 100644 --- a/sysdeps/arm/addmul_1.S +++ b/sysdeps/arm/addmul_1.S @@ -1,5 +1,5 @@ /* mpn_addmul_1 -- multiply and accumulate bignums. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -37,21 +37,16 @@ ENTRY (__mpn_addmul_1) cfi_rel_offset (r6, 8) cfi_rel_offset (r7, 12) - sfi_breg r1, \ - ldr r6, [\B], #4 - sfi_breg r0, \ - ldr r5, [\B] + ldr r6, [r1], #4 + ldr r5, [r0] mov r4, #0 /* init carry in */ b 1f 0: - sfi_breg r1, \ - ldr r6, [\B], #4 /* load next ul */ + ldr r6, [r1], #4 /* load next ul */ adds r7, r4, r5 /* (out, c) = cl + lpl */ - sfi_breg r0, \ - ldr r5, [\B, #4] /* load next rl */ + ldr r5, [r0, #4] /* load next rl */ adc r4, ip, #0 /* cl = hpl + c */ - sfi_breg r0, \ - str r7, [\B], #4 + str r7, [r0], #4 1: mov ip, #0 /* zero-extend rl */ umlal r5, ip, r6, r3 /* (hpl, lpl) = ul * vl + rl */ @@ -59,8 +54,7 @@ ENTRY (__mpn_addmul_1) bne 0b adds r4, r4, r5 /* (out, c) = cl + llpl */ - sfi_breg r0, \ - str r4, [\B] + str r4, [r0] adc r0, ip, #0 /* return hpl + c */ pop { r4, r5, r6, r7 } diff --git a/sysdeps/arm/aeabi_assert.c b/sysdeps/arm/aeabi_assert.c index 8ba0d7c93b..22cf43efcf 100644 --- a/sysdeps/arm/aeabi_assert.c +++ b/sysdeps/arm/aeabi_assert.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2016 Free Software Foundation, Inc. +/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_atexit.c b/sysdeps/arm/aeabi_atexit.c index 0913e14018..e30df8625e 100644 --- a/sysdeps/arm/aeabi_atexit.c +++ b/sysdeps/arm/aeabi_atexit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_errno_addr.c b/sysdeps/arm/aeabi_errno_addr.c index dd45652b4f..5c7dc40114 100644 --- a/sysdeps/arm/aeabi_errno_addr.c +++ b/sysdeps/arm/aeabi_errno_addr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2016 Free Software Foundation, Inc. +/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_lcsts.c b/sysdeps/arm/aeabi_lcsts.c index b438889716..a37cb88495 100644 --- a/sysdeps/arm/aeabi_lcsts.c +++ b/sysdeps/arm/aeabi_lcsts.c @@ -1,5 +1,5 @@ /* Link-time constants for ARM EABI. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_localeconv.c b/sysdeps/arm/aeabi_localeconv.c index 2636e952ae..3f56742a63 100644 --- a/sysdeps/arm/aeabi_localeconv.c +++ b/sysdeps/arm/aeabi_localeconv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2016 Free Software Foundation, Inc. +/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_math.c b/sysdeps/arm/aeabi_math.c index d1fcac1a52..b0c153d4f6 100644 --- a/sysdeps/arm/aeabi_math.c +++ b/sysdeps/arm/aeabi_math.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2016 Free Software Foundation, Inc. +/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_mb_cur_max.c b/sysdeps/arm/aeabi_mb_cur_max.c index 8bdbc88c76..16d009adf6 100644 --- a/sysdeps/arm/aeabi_mb_cur_max.c +++ b/sysdeps/arm/aeabi_mb_cur_max.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2016 Free Software Foundation, Inc. +/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_memclr.c b/sysdeps/arm/aeabi_memclr.c index 197bac4b6b..b2f65e5fb9 100644 --- a/sysdeps/arm/aeabi_memclr.c +++ b/sysdeps/arm/aeabi_memclr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,12 +17,12 @@ #include <string.h> -/* Clear memory. Can't alias to bzero because it's not defined in the - same translation unit. */ +/* Set memory like memset, but different argument order and no return + value required. Also only integer caller-saves may be used. */ void __aeabi_memclr (void *dest, size_t n) { - __bzero (dest, n); + memset (dest, 0, n); } /* Versions of the above which may assume memory alignment. */ diff --git a/sysdeps/arm/aeabi_memcpy.c b/sysdeps/arm/aeabi_memcpy.c index a89bb81252..2fa915684f 100644 --- a/sysdeps/arm/aeabi_memcpy.c +++ b/sysdeps/arm/aeabi_memcpy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_memmove.c b/sysdeps/arm/aeabi_memmove.c index e95af8a66a..920ff8e2c1 100644 --- a/sysdeps/arm/aeabi_memmove.c +++ b/sysdeps/arm/aeabi_memmove.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_memset.c b/sysdeps/arm/aeabi_memset.c index 608c07c183..4eb990e0cb 100644 --- a/sysdeps/arm/aeabi_memset.c +++ b/sysdeps/arm/aeabi_memset.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_sighandlers.S b/sysdeps/arm/aeabi_sighandlers.S index 53b3b6c205..342e04a259 100644 --- a/sysdeps/arm/aeabi_sighandlers.S +++ b/sysdeps/arm/aeabi_sighandlers.S @@ -1,5 +1,5 @@ /* Link-time constants for ARM EABI - signal handlers. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/aeabi_unwind_cpp_pr1.c b/sysdeps/arm/aeabi_unwind_cpp_pr1.c index 88eed1c863..ef0b9b6fe5 100644 --- a/sysdeps/arm/aeabi_unwind_cpp_pr1.c +++ b/sysdeps/arm/aeabi_unwind_cpp_pr1.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/arm-features.h b/sysdeps/arm/arm-features.h index fe6a6b72d6..69c4f9d604 100644 --- a/sysdeps/arm/arm-features.h +++ b/sysdeps/arm/arm-features.h @@ -1,5 +1,5 @@ /* Macros to test for CPU features on ARM. Generic ARM version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/arm-ifunc.h b/sysdeps/arm/arm-ifunc.h new file mode 100644 index 0000000000..80f4f0e3a3 --- /dev/null +++ b/sysdeps/arm/arm-ifunc.h @@ -0,0 +1,33 @@ +/* Common definition for ifunc resolvers. Linux/ARM version. + This file is part of the GNU C Library. + Copyright (C) 2017-2018 Free Software Foundation, Inc. + + 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 <ifunc-init.h> + +#define INIT_ARCH() + +#define arm_libc_ifunc_redirected(redirected_name, name, expr) \ + __ifunc (redirected_name, name, expr(hwcap), int hwcap, INIT_ARCH) + +#if defined SHARED +# define arm_libc_ifunc_hidden_def(redirect_name, name) \ + __hidden_ver1 (name, __GI_##name, redirect_name) \ + __attribute__ ((visibility ("hidden"))) +#else +# define arm_libc_ifunc_hidden_def(redirect_name, name) +#endif diff --git a/sysdeps/arm/arm-mcount.S b/sysdeps/arm/arm-mcount.S index d690d7c397..23ea080cf9 100644 --- a/sysdeps/arm/arm-mcount.S +++ b/sysdeps/arm/arm-mcount.S @@ -1,5 +1,5 @@ /* Implementation of profiling support. ARM EABI version. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -90,8 +90,7 @@ ENTRY(__mcount_arm_compat) cfi_rel_offset (lr, 20) movs r0, fp ittt ne - sfi_breg r0, \ - ldrne r0, [\B, #-4] + ldrne r0, [r0, #-4] movsne r1, lr blne __mcount_internal # if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__) diff --git a/sysdeps/arm/arm-unwind-resume.S b/sysdeps/arm/arm-unwind-resume.S index c9ac904021..3433617e48 100644 --- a/sysdeps/arm/arm-unwind-resume.S +++ b/sysdeps/arm/arm-unwind-resume.S @@ -1,5 +1,5 @@ /* _Unwind_Resume wrapper for ARM EABI. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/armv6/rawmemchr.S b/sysdeps/arm/armv6/rawmemchr.S index 2fda9a8c9b..6c9d6de3b1 100644 --- a/sysdeps/arm/armv6/rawmemchr.S +++ b/sysdeps/arm/armv6/rawmemchr.S @@ -1,5 +1,5 @@ /* rawmemchr -- find a byte within an unsized memory block. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -25,8 +25,7 @@ ENTRY (__rawmemchr) @ r0 = start of string @ r1 = character to match @ returns a pointer to the match, which must be present. - sfi_breg r0, \ - ldrb r2, [\B] @ load first byte asap + ldrb r2, [r0] @ load first byte asap @ To cater to long strings, we want to search through a few @ characters until we reach an aligned pointer. To cater to @@ -42,8 +41,7 @@ ENTRY (__rawmemchr) bxeq lr @ Loop until we find ... -1: sfi_breg r0, \ - ldrb r2, [\B, #1]! +1: ldrb r2, [r0, #1]! subs r3, r3, #1 @ ... the alignment point it ne cmpne r2, r1 @ ... or C @@ -56,16 +54,15 @@ ENTRY (__rawmemchr) add r0, r0, #1 @ So now we're aligned. - sfi_breg r0, \ - ldrd r2, r3, [\B], #8 + ldrd r2, r3, [r0], #8 orr r1, r1, r1, lsl #8 @ Replicate C to all bytes #ifdef ARCH_HAS_T2 movw ip, #0x0101 - sfi_pld r0, #64 + pld [r0, #64] movt ip, #0x0101 #else ldr ip, =0x01010101 - sfi_pld r0, #64 + pld [r0, #64] #endif orr r1, r1, r1, lsl #16 @@ -77,11 +74,10 @@ ENTRY (__rawmemchr) eor r3, r3, r1 uqsub8 r2, ip, r2 @ Find C uqsub8 r3, ip, r3 - sfi_pld r0, #128 + pld [r0, #128] orrs r3, r3, r2 @ Test both words for found it eq - sfi_breg r0, \ - ldrdeq r2, r3, [\B], #8 + ldrdeq r2, r3, [r0], #8 beq 2b @ Found something. Disambiguate between first and second words. diff --git a/sysdeps/arm/armv6/strchr.S b/sysdeps/arm/armv6/strchr.S index 06e00376c0..d7f75fa840 100644 --- a/sysdeps/arm/armv6/strchr.S +++ b/sysdeps/arm/armv6/strchr.S @@ -1,5 +1,5 @@ /* strchr -- find the first instance of C in a nul-terminated string. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -25,8 +25,7 @@ ENTRY (strchr) @ r0 = start of string @ r1 = character to match @ returns NULL for no match, or a pointer to the match - sfi_breg r0, \ - ldrb r2, [\B] @ load the first byte asap + ldrb r2, [r0] @ load the first byte asap uxtb r1, r1 @ To cater to long strings, we want to search through a few @@ -43,8 +42,7 @@ ENTRY (strchr) beq 99f @ Loop until we find ... -1: sfi_breg r0, \ - ldrb r2, [\B, #1]! +1: ldrb r2, [r0, #1]! subs r3, r3, #1 @ ... the aligment point it ne cmpne r2, r1 @ ... or the character @@ -67,16 +65,15 @@ ENTRY (strchr) cfi_rel_offset (r6, 8) cfi_rel_offset (r7, 12) - sfi_breg r0, \ - ldrd r2, r3, [\B], #8 + ldrd r2, r3, [r0], #8 orr r1, r1, r1, lsl #8 @ Replicate C to all bytes #ifdef ARCH_HAS_T2 movw ip, #0x0101 - sfi_pld r0, #64 + pld [r0, #64] movt ip, #0x0101 #else ldr ip, =0x01010101 - sfi_pld r0, #64 + pld [r0, #64] #endif orr r1, r1, r1, lsl #16 @@ -90,14 +87,13 @@ ENTRY (strchr) uqsub8 r5, ip, r3 eor r7, r3, r1 uqsub8 r6, ip, r6 @ Find C - sfi_pld r0, #128 @ Prefetch 2 lines ahead + pld [r0, #128] @ Prefetch 2 lines ahead uqsub8 r7, ip, r7 orr r4, r4, r6 @ Combine found for EOS and C orr r5, r5, r7 orrs r6, r4, r5 @ Combine the two words it eq - sfi_breg r0, \ - ldrdeq r2, r3, [\B], #8 + ldrdeq r2, r3, [r0], #8 beq 2b @ Found something. Disambiguate between first and second words. diff --git a/sysdeps/arm/armv6/strcpy.S b/sysdeps/arm/armv6/strcpy.S index c0484a3cf9..10c5c575ad 100644 --- a/sysdeps/arm/armv6/strcpy.S +++ b/sysdeps/arm/armv6/strcpy.S @@ -1,5 +1,5 @@ /* strcpy -- copy a nul-terminated string. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -44,8 +44,8 @@ ENTRY (strcpy) @ Signal strcpy with DEST in IP. mov ip, r0 0: - sfi_pld r0 - sfi_pld r1 + pld [r0, #0] + pld [r1, #0] @ To cater to long strings, we want 8 byte alignment in the source. @ To cater to small strings, we don't want to start that right away. @@ -54,11 +54,9 @@ ENTRY (strcpy) rsb r3, r3, #16 @ Loop until we find ... -1: sfi_breg r1, \ - ldrb r2, [\B], #1 +1: ldrb r2, [r1], #1 subs r3, r3, #1 @ ... the alignment point - sfi_breg r0, \ - strb r2, [\B], #1 + strb r2, [r0], #1 it ne cmpne r2, #0 @ ... or EOS bne 1b @@ -68,10 +66,9 @@ ENTRY (strcpy) beq .Lreturn @ Load the next two words asap - sfi_breg r1, \ - ldrd r2, r3, [\B], #8 - sfi_pld r0, #64 - sfi_pld r1, #64 + ldrd r2, r3, [r1], #8 + pld [r0, #64] + pld [r1, #64] @ For longer strings, we actaully need a stack frame. push { r4, r5, r6, r7 } @@ -99,18 +96,15 @@ ENTRY (strcpy) .balign 16 2: uqsub8 r4, r7, r2 @ Find EOS uqsub8 r5, r7, r3 - sfi_pld r1, #128 + pld [r1, #128] cmp r4, #0 @ EOS in first word? - sfi_pld r0, #128 + pld [r0, #128] bne 3f - sfi_breg r0, \ - str r2, [\B], #4 + str r2, [r0], #4 cmp r5, #0 @ EOS in second word? bne 4f - sfi_breg r0, \ - str r3, [\B], #4 - sfi_breg r1, \ - ldrd r2, r3, [\B], #8 + str r3, [r0], #4 + ldrd r2, r3, [r1], #8 b 2b 3: sub r1, r1, #4 @ backup to first word @@ -120,11 +114,9 @@ ENTRY (strcpy) @ Note that we generally back up and re-read source bytes, @ but we'll not re-write dest bytes. .Lbyte_loop: - sfi_breg r1, \ - ldrb r2, [\B], #1 + ldrb r2, [r1], #1 cmp r2, #0 - sfi_breg r0, \ - strb r2, [\B], #1 + strb r2, [r0], #1 bne .Lbyte_loop pop { r4, r5, r6, r7 } @@ -169,8 +161,7 @@ ENTRY (strcpy) @ Store a few bytes from the first word. @ At the same time we align r0 and shift out bytes from r2. .rept 4-\unalign - sfi_breg r0, \ - strb r2, [\B], #1 + strb r2, [r0], #1 lsr r2, r2, #8 .endr #ifdef __ARMEB__ @@ -185,23 +176,20 @@ ENTRY (strcpy) orr r2, r2, r3, lsh_gt #(\unalign*8) @ Save leftover bytes from the two words lsh_ls r6, r3, #((4-\unalign)*8) - sfi_breg r0, \ - str r2, [\B], #4 + str r2, [r0], #4 @ The "real" start of the unaligned copy loop. - sfi_breg r1, \ - ldrd r2, r3, [\B], #8 @ Load 8 more bytes + ldrd r2, r3, [r1], #8 @ Load 8 more bytes uqsub8 r4, r7, r2 @ Find EOS - sfi_pld r1, #128 + pld [r1, #128] uqsub8 r5, r7, r3 - sfi_pld r0, #128 + pld [r0, #128] cmp r4, #0 @ EOS in first word? bne 3f @ Combine the leftover and the first word orr r6, r6, r2, lsh_gt #(\unalign*8) @ Discard used bytes from the first word. lsh_ls r2, r2, #((4-\unalign)*8) - sfi_breg r0, \ - str r6, [\B], #4 + str r6, [r0], #4 b 1b @ Found EOS in one of the words; adjust backward 3: sub r1, r1, #4 @@ -212,8 +200,7 @@ ENTRY (strcpy) rev r2, r2 #endif .rept \unalign - sfi_breg r0, \ - strb r2, [\B], #1 + strb r2, [r0], #1 lsr r2, r2, #8 .endr b .Lbyte_loop diff --git a/sysdeps/arm/armv6/strlen.S b/sysdeps/arm/armv6/strlen.S index d235333062..1fb91342a3 100644 --- a/sysdeps/arm/armv6/strlen.S +++ b/sysdeps/arm/armv6/strlen.S @@ -1,5 +1,5 @@ /* strlen -- find the length of a nul-terminated string. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -23,8 +23,7 @@ ENTRY (strlen) @ r0 = start of string - sfi_breg r0, \ - ldrb r2, [\B] @ load the first byte asap + ldrb r2, [r0] @ load the first byte asap @ To cater to long strings, we want to search through a few @ characters until we reach an aligned pointer. To cater to @@ -39,8 +38,7 @@ ENTRY (strlen) beq 99f @ Loop until we find ... -1: sfi_breg r0, \ - ldrb r2, [\B, #1]! +1: ldrb r2, [r0, #1]! subs r3, r3, #1 @ ... the aligment point it ne cmpne r2, #0 @ ... or EOS @@ -52,15 +50,14 @@ ENTRY (strlen) add r0, r0, #1 @ So now we're aligned. - sfi_breg r0, \ - ldrd r2, r3, [\B], #8 + ldrd r2, r3, [r0], #8 #ifdef ARCH_HAS_T2 movw ip, #0x0101 - sfi_pld r0, #64 + pld [r0, #64] movt ip, #0x0101 #else ldr ip, =0x01010101 - sfi_pld r0, #64 + pld [r0, #64] #endif @ Loop searching for EOS, 8 bytes at a time. @@ -70,11 +67,10 @@ ENTRY (strlen) .balign 16 2: uqsub8 r2, ip, r2 @ Find EOS uqsub8 r3, ip, r3 - sfi_pld r0, #128 @ Prefetch 2 lines ahead + pld [r0, #128] @ Prefetch 2 lines ahead orrs r3, r3, r2 @ Combine the two words it eq - sfi_breg r0, \ - ldrdeq r2, r3, [\B], #8 + ldrdeq r2, r3, [r0], #8 beq 2b @ Found something. Disambiguate between first and second words. diff --git a/sysdeps/arm/armv6/strrchr.S b/sysdeps/arm/armv6/strrchr.S index 4c3cb39e81..892dd2b1dd 100644 --- a/sysdeps/arm/armv6/strrchr.S +++ b/sysdeps/arm/armv6/strrchr.S @@ -1,5 +1,5 @@ /* strrchr -- find the last occurence of C in a nul-terminated string - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -33,8 +33,7 @@ ENTRY (strrchr) @ Loop a few times until we're aligned. tst r3, #7 beq 2f -1: sfi_breg r3, \ - ldrb r2, [\B], #1 +1: ldrb r2, [r3], #1 cmp r2, r1 @ Find the character it eq subeq r0, r3, #1 @@ -65,8 +64,7 @@ ENTRY (strrchr) @ Loop searching for EOS and C, 8 bytes at a time. @ Any time we find a match in a word, we copy the address of @ the word to r0, and the found bits to r2. -3: sfi_breg r3, \ - ldrd r4, r5, [\B], #8 +3: ldrd r4, r5, [r3], #8 @ Subtracting (unsigned saturating) from 1 means result of 1 for @ any byte that was originally zero and 0 otherwise. Therefore @ we consider the lsb of each byte the "found" bit. diff --git a/sysdeps/arm/armv6t2/ffs.S b/sysdeps/arm/armv6t2/ffs.S index 951a54ec88..0f8d806436 100644 --- a/sysdeps/arm/armv6t2/ffs.S +++ b/sysdeps/arm/armv6t2/ffs.S @@ -1,5 +1,5 @@ /* ffs -- find first set bit in an int, from least significant end. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/armv6t2/ffsll.S b/sysdeps/arm/armv6t2/ffsll.S index 36a55434a7..3b8404ec9e 100644 --- a/sysdeps/arm/armv6t2/ffsll.S +++ b/sysdeps/arm/armv6t2/ffsll.S @@ -1,5 +1,5 @@ /* ffsll -- find first set bit in a long long, from least significant end. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/armv6t2/memchr.S b/sysdeps/arm/armv6t2/memchr.S index ded52dc21e..1d6eee0a11 100644 --- a/sysdeps/arm/armv6t2/memchr.S +++ b/sysdeps/arm/armv6t2/memchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2016 Free Software Foundation, Inc. +/* Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Code contributed by Dave Gilbert <david.gilbert@linaro.org> @@ -42,12 +42,8 @@ .syntax unified .text -#ifdef NO_THUMB - .arm -#else .thumb .thumb_func -#endif .global memchr .type memchr,%function ENTRY(memchr) @@ -65,8 +61,7 @@ ENTRY(memchr) @ Work up to an aligned point 5: - sfi_breg r0, \ - ldrb r3, [\B],#1 + ldrb r3, [r0],#1 subs r2, r2, #1 cmp r3, r1 beq 50f @ If it matches exit found @@ -91,24 +86,15 @@ ENTRY(memchr) movs r3, #0 15: - sfi_breg r0, \ - ldrd r4,r5, [\B],#8 -#ifndef NO_THUMB + ldrd r4,r5, [r0],#8 subs r6, r6, #8 -#endif eor r4,r4, r1 @ Get it so that r4,r5 have 00's where the bytes match the target eor r5,r5, r1 uadd8 r4, r4, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0 sel r4, r3, r7 @ bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION uadd8 r5, r5, r7 @ Parallel add 0xff - sets the GE bits for anything that wasn't 0 sel r5, r4, r7 @ chained....bytes are 00 for none-00 bytes, or ff for 00 bytes - NOTE INVERSION -#ifndef NO_THUMB cbnz r5, 60f -#else - cmp r5, #0 - bne 60f - subs r6, r6, #8 -#endif bne 15b @ (Flags from the subs above) If not run out of bytes then go around again pop {r4,r5,r6,r7} @@ -122,25 +108,13 @@ ENTRY(memchr) and r2,r2,#7 @ Leave the count remaining as the number after the double words have been done 20: -#ifndef NO_THUMB cbz r2, 40f @ 0 length or hit the end already then not found -#else - cmp r2, #0 - beq 40f -#endif 21: @ Post aligned section, or just a short call - sfi_breg r0, \ - ldrb r3,[\B],#1 -#ifndef NO_THUMB + ldrb r3,[r0],#1 subs r2,r2,#1 eor r3,r3,r1 @ r3 = 0 if match - doesn't break flags from sub cbz r3, 50f -#else - eors r3, r3, r1 - beq 50f - subs r2, r2, #1 -#endif bne 21b @ on r2 flags 40: diff --git a/sysdeps/arm/armv6t2/strlen.S b/sysdeps/arm/armv6t2/strlen.S index 4f320de570..a34ef20e9d 100644 --- a/sysdeps/arm/armv6t2/strlen.S +++ b/sysdeps/arm/armv6t2/strlen.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 Free Software Foundation, Inc. +/* Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,7 @@ */ -#include <arm-features.h> /* This might #define NO_THUMB. */ +#include <arm-features.h> #include <sysdep.h> #ifdef __ARMEB__ @@ -32,24 +32,8 @@ #define S2HI lsl #endif -#ifndef NO_THUMB /* This code is best on Thumb. */ .thumb -#else -/* Using bne.w explicitly is desirable in Thumb mode because it helps - align the following label without a nop. In ARM mode there is no - such difference. */ -.macro bne.w label - bne \label -.endm - -/* This clobbers the condition codes, which the real Thumb cbnz instruction - does not do. But it doesn't matter for any of the uses here. */ -.macro cbnz reg, label - cmp \reg, #0 - bne \label -.endm -#endif /* Parameters and result. */ #define srcin r0 @@ -67,7 +51,7 @@ .text .p2align 6 ENTRY(strlen) - sfi_pld srcin, #0 + pld [srcin, #0] strd r4, r5, [sp, #-8]! cfi_adjust_cfa_offset (8) cfi_rel_offset (r4, 0) @@ -76,15 +60,14 @@ ENTRY(strlen) bic src, srcin, #7 mvn const_m1, #0 ands tmp1, srcin, #7 /* (8 - bytes) to alignment. */ - sfi_pld src, #32 + pld [src, #32] bne.w .Lmisaligned8 mov const_0, #0 mov result, #-8 .Lloop_aligned: /* Bytes 0-7. */ - sfi_breg src, \ - ldrd data1a, data1b, [\B] - sfi_pld src, #64 + ldrd data1a, data1b, [src] + pld [src, #64] add result, result, #8 .Lstart_realigned: uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */ @@ -94,8 +77,7 @@ ENTRY(strlen) cbnz data1b, .Lnull_found /* Bytes 8-15. */ - sfi_breg src, \ - ldrd data1a, data1b, [\B, #8] + ldrd data1a, data1b, [src, #8] uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */ add result, result, #8 sel data1a, const_0, const_m1 /* Select based on GE<0:3>. */ @@ -104,8 +86,7 @@ ENTRY(strlen) cbnz data1b, .Lnull_found /* Bytes 16-23. */ - sfi_breg src, \ - ldrd data1a, data1b, [\B, #16] + ldrd data1a, data1b, [src, #16] uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */ add result, result, #8 sel data1a, const_0, const_m1 /* Select based on GE<0:3>. */ @@ -114,8 +95,7 @@ ENTRY(strlen) cbnz data1b, .Lnull_found /* Bytes 24-31. */ - sfi_breg src, \ - ldrd data1a, data1b, [\B, #24] + ldrd data1a, data1b, [src, #24] add src, src, #32 uadd8 data1a, data1a, const_m1 /* Saturating GE<0:3> set. */ add result, result, #8 @@ -143,24 +123,16 @@ ENTRY(strlen) .Lmisaligned8: cfi_restore_state - sfi_breg src, \ - ldrd data1a, data1b, [\B] + ldrd data1a, data1b, [src] and tmp2, tmp1, #3 rsb result, tmp1, #0 lsl tmp2, tmp2, #3 /* Bytes -> bits. */ tst tmp1, #4 - sfi_pld src, #64 + pld [src, #64] S2HI tmp2, const_m1, tmp2 -#ifdef NO_THUMB - mvn tmp1, tmp2 - orr data1a, data1a, tmp1 - itt ne - orrne data1b, data1b, tmp1 -#else orn data1a, data1a, tmp2 itt ne ornne data1b, data1b, tmp2 -#endif movne data1a, const_m1 mov const_0, #0 b .Lstart_realigned diff --git a/sysdeps/arm/armv7/multiarch/Makefile b/sysdeps/arm/armv7/multiarch/Makefile index e834cc937f..6e5851f897 100644 --- a/sysdeps/arm/armv7/multiarch/Makefile +++ b/sysdeps/arm/armv7/multiarch/Makefile @@ -1,3 +1,4 @@ ifeq ($(subdir),string) -sysdep_routines += memcpy_neon memcpy_vfp +sysdep_routines += memcpy_neon memcpy_vfp memchr_neon memcpy_arm \ + memchr_noneon endif diff --git a/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c b/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c index d7088f2a22..48e43da66e 100644 --- a/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c +++ b/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c @@ -1,5 +1,5 @@ /* Enumerate available IFUNC implementations of a function. ARM version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,6 +34,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, bool use_neon = true; #ifdef __ARM_NEON__ # define __memcpy_neon memcpy +# define __memchr_neon memchr #else use_neon = (GLRO(dl_hwcap) & HWCAP_ARM_NEON) != 0; #endif @@ -52,5 +53,9 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, #endif IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_arm)); + IFUNC_IMPL (i, name, memchr, + IFUNC_IMPL_ADD (array, i, memchr, use_neon, __memchr_neon) + IFUNC_IMPL_ADD (array, i, memchr, 1, __memchr_noneon)); + return i; } diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/armv7/multiarch/ifunc-memchr.h index 6b96aee542..75495824f4 100644 --- a/sysdeps/arm/frame.h +++ b/sysdeps/arm/armv7/multiarch/ifunc-memchr.h @@ -1,5 +1,5 @@ -/* Definition of stack frame structure. ARM/APCS version. - Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Common definition for memchr resolver. + 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 @@ -13,15 +13,16 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -/* This is the APCS stack backtrace structure. */ -struct layout -{ - struct layout *next; - void *sp; - void *return_address; -}; +__typeof (REDIRECT_NAME) OPTIMIZE (neon) attribute_hidden; +__typeof (REDIRECT_NAME) OPTIMIZE (noneon) attribute_hidden; -#define FIRST_FRAME_POINTER ADVANCE_STACK_FRAME (__builtin_frame_address (0)) +static inline void * +IFUNC_SELECTOR (int hwcap) +{ + if (hwcap & HWCAP_ARM_NEON) + return OPTIMIZE (neon); + return OPTIMIZE (noneon); +} diff --git a/sysdeps/arm/armv7/multiarch/ifunc-memcpy.h b/sysdeps/arm/armv7/multiarch/ifunc-memcpy.h new file mode 100644 index 0000000000..7e6f73ff4d --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/ifunc-memcpy.h @@ -0,0 +1,37 @@ +/* Common definition for memcpy resolver. + 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/>. */ + +#ifdef __SOFTFP__ +__typeof (REDIRECT_NAME) OPTIMIZE (arm) attribute_hidden; +#endif +__typeof (REDIRECT_NAME) OPTIMIZE (vfp) attribute_hidden; +__typeof (REDIRECT_NAME) OPTIMIZE (neon) attribute_hidden; + +static inline void * +IFUNC_SELECTOR (int hwcap) +{ + if (hwcap & HWCAP_ARM_NEON) + return OPTIMIZE (neon); +#ifdef __SOFTFP__ + if (hwcap & HWCAP_ARM_VFP) + return OPTIMIZE (vfp); + return OPTIMIZE (arm); +#else + return OPTIMIZE (vfp); +#endif +} diff --git a/sysdeps/arm/armv7/multiarch/memchr.c b/sysdeps/arm/armv7/multiarch/memchr.c new file mode 100644 index 0000000000..ff1cc5d203 --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/memchr.c @@ -0,0 +1,35 @@ +/* Multiple versions of memchr. + All versions must be listed in ifunc-impl-list.c. + 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/>. */ + +/* For __ARM_NEON__ memchr_neon.S defines memchr directly and ifunc + is not used. */ +#if IS_IN (libc) && !defined (__ARM_NEON__) +# define memchr __redirect_memchr +# include <string.h> +# undef memchr + +# include <arm-ifunc.h> + +# define SYMBOL_NAME memchr +# include "ifunc-memchr.h" + +arm_libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR); + +arm_libc_ifunc_hidden_def (__redirect_memchr, memchr); +#endif diff --git a/sysdeps/arm/armv7/multiarch/memchr_neon.S b/sysdeps/arm/armv7/multiarch/memchr_neon.S new file mode 100644 index 0000000000..6fbf9b8898 --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/memchr_neon.S @@ -0,0 +1,202 @@ +/* memchr implemented using NEON. + Copyright (C) 2011-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> + +/* For __ARM_NEON__ this file defines memchr. */ +#ifndef __ARM_NEON__ +# define memchr __memchr_neon +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(a) +#endif + + .arch armv7-a + .fpu neon + + +/* Arguments */ +#define srcin r0 +#define chrin r1 +#define cntin r2 + +/* Retval */ +#define result r0 /* Live range does not overlap with srcin */ + +/* Working registers */ +#define src r1 /* Live range does not overlap with chrin */ +#define tmp r3 +#define synd r0 /* No overlap with srcin or result */ +#define soff r12 + +/* Working NEON registers */ +#define vrepchr q0 +#define vdata0 q1 +#define vdata0_0 d2 /* Lower half of vdata0 */ +#define vdata0_1 d3 /* Upper half of vdata0 */ +#define vdata1 q2 +#define vdata1_0 d4 /* Lower half of vhas_chr0 */ +#define vdata1_1 d5 /* Upper half of vhas_chr0 */ +#define vrepmask q3 +#define vrepmask0 d6 +#define vrepmask1 d7 +#define vend q4 +#define vend0 d8 +#define vend1 d9 + +/* + * Core algorithm: + * + * For each 32-byte chunk we calculate a 32-bit syndrome value, with one bit per + * byte. Each bit is set if the relevant byte matched the requested character + * and cleared otherwise. Since the bits in the syndrome reflect exactly the + * order in which things occur in the original string, counting trailing zeros + * allows to identify exactly which byte has matched. + */ + + .thumb_func + .p2align 4,,15 + +ENTRY(memchr) + /* Use a simple loop if there are less than 8 bytes to search. */ + cmp cntin, #7 + bhi .Llargestr + and chrin, chrin, #0xff + +.Lsmallstr: + subs cntin, cntin, #1 + blo .Lnotfound /* Return not found if reached end. */ + ldrb tmp, [srcin], #1 + cmp tmp, chrin + bne .Lsmallstr /* Loop again if not found. */ + /* Otherwise fixup address and return. */ + sub result, srcin, #1 + bx lr + + +.Llargestr: + vdup.8 vrepchr, chrin /* Duplicate char across all lanes. */ + /* + * Magic constant 0x8040201008040201 allows us to identify which lane + * matches the requested byte. + */ + movw tmp, #0x0201 + movt tmp, #0x0804 + lsl soff, tmp, #4 + vmov vrepmask0, tmp, soff + vmov vrepmask1, tmp, soff + /* Work with aligned 32-byte chunks */ + bic src, srcin, #31 + ands soff, srcin, #31 + beq .Lloopintro /* Go straight to main loop if it's aligned. */ + + /* + * Input string is not 32-byte aligned. We calculate the syndrome + * value for the aligned 32 bytes block containing the first bytes + * and mask the irrelevant part. + */ + vld1.8 {vdata0, vdata1}, [src:256]! + sub tmp, soff, #32 + adds cntin, cntin, tmp + vceq.i8 vdata0, vdata0, vrepchr + vceq.i8 vdata1, vdata1, vrepchr + vand vdata0, vdata0, vrepmask + vand vdata1, vdata1, vrepmask + vpadd.i8 vdata0_0, vdata0_0, vdata0_1 + vpadd.i8 vdata1_0, vdata1_0, vdata1_1 + vpadd.i8 vdata0_0, vdata0_0, vdata1_0 + vpadd.i8 vdata0_0, vdata0_0, vdata0_0 + vmov synd, vdata0_0[0] + + /* Clear the soff lower bits */ + lsr synd, synd, soff + lsl synd, synd, soff + /* The first block can also be the last */ + bls .Lmasklast + /* Have we found something already? */ + cbnz synd, .Ltail + + +.Lloopintro: + vpush {vend} + /* 264/265 correspond to d8/d9 for q4 */ + cfi_adjust_cfa_offset (16) + cfi_rel_offset (264, 0) + cfi_rel_offset (265, 8) + .p2align 3,,7 +.Lloop: + vld1.8 {vdata0, vdata1}, [src:256]! + subs cntin, cntin, #32 + vceq.i8 vdata0, vdata0, vrepchr + vceq.i8 vdata1, vdata1, vrepchr + /* If we're out of data we finish regardless of the result. */ + bls .Lend + /* Use a fast check for the termination condition. */ + vorr vend, vdata0, vdata1 + vorr vend0, vend0, vend1 + vmov synd, tmp, vend0 + orrs synd, synd, tmp + /* We're not out of data, loop if we haven't found the character. */ + beq .Lloop + +.Lend: + vpop {vend} + cfi_adjust_cfa_offset (-16) + cfi_restore (264) + cfi_restore (265) + + /* Termination condition found, let's calculate the syndrome value. */ + vand vdata0, vdata0, vrepmask + vand vdata1, vdata1, vrepmask + vpadd.i8 vdata0_0, vdata0_0, vdata0_1 + vpadd.i8 vdata1_0, vdata1_0, vdata1_1 + vpadd.i8 vdata0_0, vdata0_0, vdata1_0 + vpadd.i8 vdata0_0, vdata0_0, vdata0_0 + vmov synd, vdata0_0[0] + cbz synd, .Lnotfound + bhi .Ltail /* Uses the condition code from + subs cntin, cntin, #32 above. */ + + +.Lmasklast: + /* Clear the (-cntin) upper bits to avoid out-of-bounds matches. */ + neg cntin, cntin + lsl synd, synd, cntin + lsrs synd, synd, cntin + it eq + moveq src, #0 /* If no match, set src to 0 so the retval is 0. */ + + +.Ltail: + /* Count the trailing zeros using bit reversing */ + rbit synd, synd + /* Compensate the last post-increment */ + sub src, src, #32 + /* Count the leading zeros */ + clz synd, synd + /* Compute the potential result and return */ + add result, src, synd + bx lr + + +.Lnotfound: + /* Set result to NULL if not found and return */ + mov result, #0 + bx lr + +END(memchr) +libc_hidden_builtin_def (memchr) diff --git a/sysdeps/arm/armv7/multiarch/memchr_noneon.S b/sysdeps/arm/armv7/multiarch/memchr_noneon.S new file mode 100644 index 0000000000..b1fb54018d --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/memchr_noneon.S @@ -0,0 +1,5 @@ +#define memchr __memchr_noneon +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(name) + +#include <sysdeps/arm/armv6t2/memchr.S> diff --git a/sysdeps/arm/armv7/multiarch/memcpy.S b/sysdeps/arm/armv7/multiarch/memcpy.S deleted file mode 100644 index 01ba9e5733..0000000000 --- a/sysdeps/arm/armv7/multiarch/memcpy.S +++ /dev/null @@ -1,76 +0,0 @@ -/* Multiple versions of memcpy - All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -/* Thumb requires excess IT instructions here. */ -#define NO_THUMB -#include <sysdep.h> -#include <rtld-global-offsets.h> - -#if IS_IN (libc) -/* Under __ARM_NEON__, memcpy_neon.S defines the name memcpy. */ -# ifndef __ARM_NEON__ - .text -ENTRY(memcpy) - .type memcpy, %gnu_indirect_function -# ifdef __SOFTFP__ - ldr r1, .Lmemcpy_arm - tst r0, #HWCAP_ARM_VFP - ldrne r1, .Lmemcpy_vfp -# else - ldr r1, .Lmemcpy_vfp -# endif - tst r0, #HWCAP_ARM_NEON - ldrne r1, .Lmemcpy_neon -1: - add r0, r1, pc - DO_RET(lr) - -# ifdef __SOFTFP__ -.Lmemcpy_arm: - .long C_SYMBOL_NAME(__memcpy_arm) - 1b - PC_OFS -# endif -.Lmemcpy_neon: - .long C_SYMBOL_NAME(__memcpy_neon) - 1b - PC_OFS -.Lmemcpy_vfp: - .long C_SYMBOL_NAME(__memcpy_vfp) - 1b - PC_OFS - -END(memcpy) - -libc_hidden_builtin_def (memcpy) -#endif /* Not __ARM_NEON__. */ - -/* These versions of memcpy are defined not to clobber any VFP or NEON - registers so they must always call the ARM variant of the memcpy code. */ -strong_alias (__memcpy_arm, __aeabi_memcpy) -strong_alias (__memcpy_arm, __aeabi_memcpy4) -strong_alias (__memcpy_arm, __aeabi_memcpy8) -libc_hidden_def (__memcpy_arm) - -#undef libc_hidden_builtin_def -#define libc_hidden_builtin_def(name) -#undef weak_alias -#define weak_alias(x, y) -#undef libc_hidden_def -#define libc_hidden_def(name) - -#define memcpy __memcpy_arm - -#endif - -#include "memcpy_impl.S" diff --git a/sysdeps/arm/armv7/multiarch/memcpy.c b/sysdeps/arm/armv7/multiarch/memcpy.c new file mode 100644 index 0000000000..02776b6fe6 --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/memcpy.c @@ -0,0 +1,35 @@ +/* Multiple versions of memcpy. + All versions must be listed in ifunc-impl-list.c. + 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/>. */ + +/* For __ARM_NEON__ memchr_neon.S defines memchr directly and ifunc + is not used. */ +#if IS_IN (libc) && !defined (__ARM_NEON__) +# define memcpy __redirect_memcpy +# include <string.h> +# undef memcpy + +# include <arm-ifunc.h> + +# define SYMBOL_NAME memcpy +# include "ifunc-memcpy.h" + +arm_libc_ifunc_redirected (__redirect_memcpy, memcpy, IFUNC_SELECTOR); + +arm_libc_ifunc_hidden_def (__redirect_memcpy, memcpy); +#endif diff --git a/sysdeps/arm/armv7/multiarch/memcpy_arm.S b/sysdeps/arm/armv7/multiarch/memcpy_arm.S new file mode 100644 index 0000000000..e4a9a68c42 --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/memcpy_arm.S @@ -0,0 +1,10 @@ +#define memcpy __memcpy_arm +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(a) +#include "memcpy_impl.S" + +/* These versions of memcpy are defined not to clobber any VFP or NEON + registers so they must always call the ARM variant of the memcpy code. */ +strong_alias (__memcpy_arm, __aeabi_memcpy) +strong_alias (__memcpy_arm, __aeabi_memcpy4) +strong_alias (__memcpy_arm, __aeabi_memcpy8) diff --git a/sysdeps/arm/armv7/multiarch/memcpy_impl.S b/sysdeps/arm/armv7/multiarch/memcpy_impl.S index a1f6266c88..2de172635c 100644 --- a/sysdeps/arm/armv7/multiarch/memcpy_impl.S +++ b/sysdeps/arm/armv7/multiarch/memcpy_impl.S @@ -1,5 +1,5 @@ /* NEON/VFP/ARM version of memcpy optimized for Cortex-A15. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -226,71 +226,40 @@ #ifdef USE_VFP .macro cpy_line_vfp vreg, base - sfi_breg dst, \ - vstr \vreg, [\B, #\base] - sfi_breg src, \ - vldr \vreg, [\B, #\base] - sfi_breg dst, \ - vstr d0, [\B, #\base + 8] - sfi_breg src, \ - vldr d0, [\B, #\base + 8] - sfi_breg dst, \ - vstr d1, [\B, #\base + 16] - sfi_breg src, \ - vldr d1, [\B, #\base + 16] - sfi_breg dst, \ - vstr d2, [\B, #\base + 24] - sfi_breg src, \ - vldr d2, [\B, #\base + 24] - sfi_breg dst, \ - vstr \vreg, [\B, #\base + 32] - sfi_breg src, \ - vldr \vreg, [\B, #\base + prefetch_lines * 64 - 32] - sfi_breg dst, \ - vstr d0, [\B, #\base + 40] - sfi_breg src, \ - vldr d0, [\B, #\base + 40] - sfi_breg dst, \ - vstr d1, [\B, #\base + 48] - sfi_breg src, \ - vldr d1, [\B, #\base + 48] - sfi_breg dst, \ - vstr d2, [\B, #\base + 56] - sfi_breg src, \ - vldr d2, [\B, #\base + 56] + vstr \vreg, [dst, #\base] + vldr \vreg, [src, #\base] + vstr d0, [dst, #\base + 8] + vldr d0, [src, #\base + 8] + vstr d1, [dst, #\base + 16] + vldr d1, [src, #\base + 16] + vstr d2, [dst, #\base + 24] + vldr d2, [src, #\base + 24] + vstr \vreg, [dst, #\base + 32] + vldr \vreg, [src, #\base + prefetch_lines * 64 - 32] + vstr d0, [dst, #\base + 40] + vldr d0, [src, #\base + 40] + vstr d1, [dst, #\base + 48] + vldr d1, [src, #\base + 48] + vstr d2, [dst, #\base + 56] + vldr d2, [src, #\base + 56] .endm .macro cpy_tail_vfp vreg, base - sfi_breg dst, \ - vstr \vreg, [\B, #\base] - sfi_breg src, \ - vldr \vreg, [\B, #\base] - sfi_breg dst, \ - vstr d0, [\B, #\base + 8] - sfi_breg src, \ - vldr d0, [\B, #\base + 8] - sfi_breg dst, \ - vstr d1, [\B, #\base + 16] - sfi_breg src, \ - vldr d1, [\B, #\base + 16] - sfi_breg dst, \ - vstr d2, [\B, #\base + 24] - sfi_breg src, \ - vldr d2, [\B, #\base + 24] - sfi_breg dst, \ - vstr \vreg, [\B, #\base + 32] - sfi_breg dst, \ - vstr d0, [\B, #\base + 40] - sfi_breg src, \ - vldr d0, [\B, #\base + 40] - sfi_breg dst, \ - vstr d1, [\B, #\base + 48] - sfi_breg src, \ - vldr d1, [\B, #\base + 48] - sfi_breg dst, \ - vstr d2, [\B, #\base + 56] - sfi_breg src, \ - vldr d2, [\B, #\base + 56] + vstr \vreg, [dst, #\base] + vldr \vreg, [src, #\base] + vstr d0, [dst, #\base + 8] + vldr d0, [src, #\base + 8] + vstr d1, [dst, #\base + 16] + vldr d1, [src, #\base + 16] + vstr d2, [dst, #\base + 24] + vldr d2, [src, #\base + 24] + vstr \vreg, [dst, #\base + 32] + vstr d0, [dst, #\base + 40] + vldr d0, [src, #\base + 40] + vstr d1, [dst, #\base + 48] + vldr d1, [src, #\base + 48] + vstr d2, [dst, #\base + 56] + vldr d2, [src, #\base + 56] .endm #endif @@ -307,7 +276,7 @@ ENTRY(memcpy) #ifdef USE_NEON /* These need an extra layer of macro just to work around a bug in the assembler's parser when an operand starts with - a {...}. http://sourceware.org/bugzilla/show_bug.cgi?id=15647 + a {...}. https://sourceware.org/bugzilla/show_bug.cgi?id=15647 tracks that bug; it was not fixed as of binutils-2.23.2. */ .macro neon_load_d0 reg vld1.8 {d0}, [\reg]! @@ -316,26 +285,16 @@ ENTRY(memcpy) vst1.8 {d0}, [\reg]! .endm - /* These are used by the NaCl sfi_breg macro. */ - .macro _sfi_breg_dmask_neon_load_d0 reg - _sfi_dmask \reg - .endm - .macro _sfi_breg_dmask_neon_store_d0 reg - _sfi_dmask \reg - .endm - and tmp1, count, #0x38 .macro dispatch_step i - sfi_breg src, neon_load_d0 \B - sfi_breg dst, neon_store_d0 \B + neon_load_d0 src + neon_store_d0 dst .endm dispatch_7_dword tst count, #4 - sfi_breg src, \ - ldrne tmp1, [\B], #4 - sfi_breg dst, \ - strne tmp1, [\B], #4 + ldrne tmp1, [src], #4 + strne tmp1, [dst], #4 #else /* Copy up to 15 full words of data. May not be aligned. */ /* Cannot use VFP for unaligned data. */ @@ -344,23 +303,17 @@ ENTRY(memcpy) add src, src, tmp1 /* Jump directly into the sequence below at the correct offset. */ .macro dispatch_step i - sfi_breg src, \ - ldr tmp1, [\B, #-(\i * 4)] - sfi_breg dst, \ - str tmp1, [\B, #-(\i * 4)] + ldr tmp1, [src, #-(\i * 4)] + str tmp1, [dst, #-(\i * 4)] .endm dispatch_15_word #endif lsls count, count, #31 - sfi_breg src, \ - ldrhcs tmp1, [\B], #2 - sfi_breg src, \ - ldrbne src, [\B] /* Src is dead, use as a scratch. */ - sfi_breg dst, \ - strhcs tmp1, [\B], #2 - sfi_breg dst, \ - strbne src, [\B] + ldrhcs tmp1, [src], #2 + ldrbne src, [src] /* Src is dead, use as a scratch. */ + strhcs tmp1, [dst], #2 + strbne src, [dst] bx lr .Lcpy_not_short: @@ -388,19 +341,13 @@ ENTRY(memcpy) beq 1f rsbs tmp2, tmp2, #0 sub count, count, tmp2, lsr #29 - sfi_breg src, \ - ldrmi tmp1, [\B], #4 - sfi_breg dst, \ - strmi tmp1, [\B], #4 + ldrmi tmp1, [src], #4 + strmi tmp1, [dst], #4 lsls tmp2, tmp2, #2 - sfi_breg src, \ - ldrhcs tmp1, [\B], #2 - sfi_breg src, \ - ldrbne tmp2, [\B], #1 - sfi_breg dst, \ - strhcs tmp1, [\B], #2 - sfi_breg dst, \ - strbne tmp2, [\B], #1 + ldrhcs tmp1, [src], #2 + ldrbne tmp2, [src], #1 + strhcs tmp1, [dst], #2 + strbne tmp2, [dst], #1 1: subs tmp2, count, #64 /* Use tmp2 for count. */ @@ -412,40 +359,24 @@ ENTRY(memcpy) .Lcpy_body_medium: /* Count in tmp2. */ #ifdef USE_VFP 1: - sfi_breg src, \ - vldr d0, [\B, #0] + vldr d0, [src, #0] subs tmp2, tmp2, #64 - sfi_breg src, \ - vldr d1, [\B, #8] - sfi_breg dst, \ - vstr d0, [\B, #0] - sfi_breg src, \ - vldr d0, [\B, #16] - sfi_breg dst, \ - vstr d1, [\B, #8] - sfi_breg src, \ - vldr d1, [\B, #24] - sfi_breg dst, \ - vstr d0, [\B, #16] - sfi_breg src, \ - vldr d0, [\B, #32] - sfi_breg dst, \ - vstr d1, [\B, #24] - sfi_breg src, \ - vldr d1, [\B, #40] - sfi_breg dst, \ - vstr d0, [\B, #32] - sfi_breg src, \ - vldr d0, [\B, #48] - sfi_breg dst, \ - vstr d1, [\B, #40] - sfi_breg src, \ - vldr d1, [\B, #56] - sfi_breg dst, \ - vstr d0, [\B, #48] + vldr d1, [src, #8] + vstr d0, [dst, #0] + vldr d0, [src, #16] + vstr d1, [dst, #8] + vldr d1, [src, #24] + vstr d0, [dst, #16] + vldr d0, [src, #32] + vstr d1, [dst, #24] + vldr d1, [src, #40] + vstr d0, [dst, #32] + vldr d0, [src, #48] + vstr d1, [dst, #40] + vldr d1, [src, #56] + vstr d0, [dst, #48] add src, src, #64 - sfi_breg dst, \ - vstr d1, [\B, #56] + vstr d1, [dst, #56] add dst, dst, #64 bge 1b tst tmp2, #0x3f @@ -456,48 +387,30 @@ ENTRY(memcpy) add dst, dst, tmp1 add src, src, tmp1 .macro dispatch_step i - sfi_breg src, \ - vldr d0, [\B, #-(\i * 8)] - sfi_breg dst, \ - vstr d0, [\B, #-(\i * 8)] + vldr d0, [src, #-(\i * 8)] + vstr d0, [dst, #-(\i * 8)] .endm dispatch_7_dword #else sub src, src, #8 sub dst, dst, #8 1: - sfi_breg src, \ - ldrd A_l, A_h, [\B, #8] - sfi_breg dst, \ - strd A_l, A_h, [\B, #8] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #16] - sfi_breg dst, \ - strd A_l, A_h, [\B, #16] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #24] - sfi_breg dst, \ - strd A_l, A_h, [\B, #24] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #32] - sfi_breg dst, \ - strd A_l, A_h, [\B, #32] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #40] - sfi_breg dst, \ - strd A_l, A_h, [\B, #40] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #48] - sfi_breg dst, \ - strd A_l, A_h, [\B, #48] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #56] - sfi_breg dst, \ - strd A_l, A_h, [\B, #56] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #64]! - sfi_breg dst, \ - strd A_l, A_h, [\B, #64]! + ldrd A_l, A_h, [src, #8] + strd A_l, A_h, [dst, #8] + ldrd A_l, A_h, [src, #16] + strd A_l, A_h, [dst, #16] + ldrd A_l, A_h, [src, #24] + strd A_l, A_h, [dst, #24] + ldrd A_l, A_h, [src, #32] + strd A_l, A_h, [dst, #32] + ldrd A_l, A_h, [src, #40] + strd A_l, A_h, [dst, #40] + ldrd A_l, A_h, [src, #48] + strd A_l, A_h, [dst, #48] + ldrd A_l, A_h, [src, #56] + strd A_l, A_h, [dst, #56] + ldrd A_l, A_h, [src, #64]! + strd A_l, A_h, [dst, #64]! subs tmp2, tmp2, #64 bge 1b tst tmp2, #0x3f @@ -524,28 +437,20 @@ ENTRY(memcpy) add dst, dst, tmp1 add src, src, tmp1 .macro dispatch_step i - sfi_breg src, \ - ldrd A_l, A_h, [\B, #-(\i * 8)] - sfi_breg dst, \ - strd A_l, A_h, [\B, #-(\i * 8)] + ldrd A_l, A_h, [src, #-(\i * 8)] + strd A_l, A_h, [dst, #-(\i * 8)] .endm dispatch_7_dword #endif tst tmp2, #4 - sfi_breg src, \ - ldrne tmp1, [\B], #4 - sfi_breg dst, \ - strne tmp1, [\B], #4 + ldrne tmp1, [src], #4 + strne tmp1, [dst], #4 lsls tmp2, tmp2, #31 /* Count (tmp2) now dead. */ - sfi_breg src, \ - ldrhcs tmp1, [\B], #2 - sfi_breg src, \ - ldrbne tmp2, [\B] - sfi_breg dst, \ - strhcs tmp1, [\B], #2 - sfi_breg dst, \ - strbne tmp2, [\B] + ldrhcs tmp1, [src], #2 + ldrbne tmp2, [src] + strhcs tmp1, [dst], #2 + strbne tmp2, [dst] .Ldone: ldr tmp2, [sp], #FRAME_SIZE @@ -565,23 +470,15 @@ ENTRY(memcpy) copy position into a register. This should act like a PLD operation but we won't have to repeat the transfer. */ - sfi_breg src, \ - vldr d3, [\B, #0] - sfi_breg src, \ - vldr d4, [\B, #64] - sfi_breg src, \ - vldr d5, [\B, #128] - sfi_breg src, \ - vldr d6, [\B, #192] - sfi_breg src, \ - vldr d7, [\B, #256] - - sfi_breg src, \ - vldr d0, [\B, #8] - sfi_breg src, \ - vldr d1, [\B, #16] - sfi_breg src, \ - vldr d2, [\B, #24] + vldr d3, [src, #0] + vldr d4, [src, #64] + vldr d5, [src, #128] + vldr d6, [src, #192] + vldr d7, [src, #256] + + vldr d0, [src, #8] + vldr d1, [src, #16] + vldr d2, [src, #24] add src, src, #32 subs tmp2, tmp2, #prefetch_lines * 64 * 2 @@ -606,31 +503,19 @@ ENTRY(memcpy) add src, src, #3 * 64 add dst, dst, #3 * 64 cpy_tail_vfp d6, 0 - sfi_breg dst, \ - vstr d7, [\B, #64] - sfi_breg src, \ - vldr d7, [\B, #64] - sfi_breg dst, \ - vstr d0, [\B, #64 + 8] - sfi_breg src, \ - vldr d0, [\B, #64 + 8] - sfi_breg dst, \ - vstr d1, [\B, #64 + 16] - sfi_breg src, \ - vldr d1, [\B, #64 + 16] - sfi_breg dst, \ - vstr d2, [\B, #64 + 24] - sfi_breg src, \ - vldr d2, [\B, #64 + 24] - sfi_breg dst, \ - vstr d7, [\B, #64 + 32] + vstr d7, [dst, #64] + vldr d7, [src, #64] + vstr d0, [dst, #64 + 8] + vldr d0, [src, #64 + 8] + vstr d1, [dst, #64 + 16] + vldr d1, [src, #64 + 16] + vstr d2, [dst, #64 + 24] + vldr d2, [src, #64 + 24] + vstr d7, [dst, #64 + 32] add src, src, #96 - sfi_breg dst, \ - vstr d0, [\B, #64 + 40] - sfi_breg dst, \ - vstr d1, [\B, #64 + 48] - sfi_breg dst, \ - vstr d2, [\B, #64 + 56] + vstr d0, [dst, #64 + 40] + vstr d1, [dst, #64 + 48] + vstr d2, [dst, #64 + 56] add dst, dst, #128 add tmp2, tmp2, #prefetch_lines * 64 b .Lcpy_body_medium @@ -641,83 +526,59 @@ ENTRY(memcpy) /* Pre-bias src and dst. */ sub src, src, #8 sub dst, dst, #8 - sfi_pld src, #8 - sfi_pld src, #72 + pld [src, #8] + pld [src, #72] subs tmp2, tmp2, #64 - sfi_pld src, #136 - sfi_breg src, \ - ldrd A_l, A_h, [\B, #8] + pld [src, #136] + ldrd A_l, A_h, [src, #8] strd B_l, B_h, [sp, #8] cfi_rel_offset (B_l, 8) cfi_rel_offset (B_h, 12) - sfi_breg src, \ - ldrd B_l, B_h, [\B, #16] + ldrd B_l, B_h, [src, #16] strd C_l, C_h, [sp, #16] cfi_rel_offset (C_l, 16) cfi_rel_offset (C_h, 20) - sfi_breg src, \ - ldrd C_l, C_h, [\B, #24] + ldrd C_l, C_h, [src, #24] strd D_l, D_h, [sp, #24] cfi_rel_offset (D_l, 24) cfi_rel_offset (D_h, 28) - sfi_pld src, #200 - sfi_breg src, \ - ldrd D_l, D_h, [\B, #32]! + pld [src, #200] + ldrd D_l, D_h, [src, #32]! b 1f .p2align 6 2: - sfi_pld src, #232 - sfi_breg dst, \ - strd A_l, A_h, [\B, #40] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #40] - sfi_breg dst, \ - strd B_l, B_h, [\B, #48] - sfi_breg src, \ - ldrd B_l, B_h, [\B, #48] - sfi_breg dst, \ - strd C_l, C_h, [\B, #56] - sfi_breg src, \ - ldrd C_l, C_h, [\B, #56] - sfi_breg dst, \ - strd D_l, D_h, [\B, #64]! - sfi_breg src, \ - ldrd D_l, D_h, [\B, #64]! + pld [src, #232] + strd A_l, A_h, [dst, #40] + ldrd A_l, A_h, [src, #40] + strd B_l, B_h, [dst, #48] + ldrd B_l, B_h, [src, #48] + strd C_l, C_h, [dst, #56] + ldrd C_l, C_h, [src, #56] + strd D_l, D_h, [dst, #64]! + ldrd D_l, D_h, [src, #64]! subs tmp2, tmp2, #64 1: - sfi_breg dst, \ - strd A_l, A_h, [\B, #8] - sfi_breg src, \ - ldrd A_l, A_h, [\B, #8] - sfi_breg dst, \ - strd B_l, B_h, [\B, #16] - sfi_breg src, \ - ldrd B_l, B_h, [\B, #16] - sfi_breg dst, \ - strd C_l, C_h, [\B, #24] - sfi_breg src, \ - ldrd C_l, C_h, [\B, #24] - sfi_breg dst, \ - strd D_l, D_h, [\B, #32] - sfi_breg src, \ - ldrd D_l, D_h, [\B, #32] + strd A_l, A_h, [dst, #8] + ldrd A_l, A_h, [src, #8] + strd B_l, B_h, [dst, #16] + ldrd B_l, B_h, [src, #16] + strd C_l, C_h, [dst, #24] + ldrd C_l, C_h, [src, #24] + strd D_l, D_h, [dst, #32] + ldrd D_l, D_h, [src, #32] bcs 2b /* Save the remaining bytes and restore the callee-saved regs. */ - sfi_breg dst, \ - strd A_l, A_h, [\B, #40] + strd A_l, A_h, [dst, #40] add src, src, #40 - sfi_breg dst, \ - strd B_l, B_h, [\B, #48] + strd B_l, B_h, [dst, #48] ldrd B_l, B_h, [sp, #8] cfi_restore (B_l) cfi_restore (B_h) - sfi_breg dst, \ - strd C_l, C_h, [\B, #56] + strd C_l, C_h, [dst, #56] ldrd C_l, C_h, [sp, #16] cfi_restore (C_l) cfi_restore (C_h) - sfi_breg dst, \ - strd D_l, D_h, [\B, #64] + strd D_l, D_h, [dst, #64] ldrd D_l, D_h, [sp, #24] cfi_restore (D_l) cfi_restore (D_h) @@ -734,35 +595,29 @@ ENTRY(memcpy) cfi_remember_state .Lcpy_notaligned: - sfi_pld src - sfi_pld src, #64 + pld [src, #0] + pld [src, #64] /* There's at least 64 bytes to copy, but there is no mutual alignment. */ /* Bring DST to 64-bit alignment. */ lsls tmp2, dst, #29 - sfi_pld src, #(2 * 64) + pld [src, #(2 * 64)] beq 1f rsbs tmp2, tmp2, #0 sub count, count, tmp2, lsr #29 - sfi_breg src, \ - ldrmi tmp1, [\B], #4 - sfi_breg dst, \ - strmi tmp1, [\B], #4 + ldrmi tmp1, [src], #4 + strmi tmp1, [dst], #4 lsls tmp2, tmp2, #2 - sfi_breg src, \ - ldrbne tmp1, [\B], #1 - sfi_breg src, \ - ldrhcs tmp2, [\B], #2 - sfi_breg dst, \ - strbne tmp1, [\B], #1 - sfi_breg dst, \ - strhcs tmp2, [\B], #2 + ldrbne tmp1, [src], #1 + ldrhcs tmp2, [src], #2 + strbne tmp1, [dst], #1 + strhcs tmp2, [dst], #2 1: - sfi_pld src, #(3 * 64) + pld [src, #(3 * 64)] subs count, count, #64 ldrmi tmp2, [sp], #FRAME_SIZE bmi .Ltail63unaligned - sfi_pld src, #(4 * 64) + pld [src, #(4 * 64)] #ifdef USE_NEON /* These need an extra layer of macro just to work around a @@ -775,132 +630,88 @@ ENTRY(memcpy) vst1.8 {\reglist}, [ALIGN (\basereg, 64)]! .endm - /* These are used by the NaCl sfi_breg macro. */ - .macro _sfi_breg_dmask_neon_load_multi reg - _sfi_dmask \reg - .endm - .macro _sfi_breg_dmask_neon_store_multi reg - _sfi_dmask \reg - .endm - - sfi_breg src, neon_load_multi d0-d3, \B - sfi_breg src, neon_load_multi d4-d7, \B + neon_load_multi d0-d3, src + neon_load_multi d4-d7, src subs count, count, #64 bmi 2f 1: - sfi_pld src, #(4 * 64) - sfi_breg dst, neon_store_multi d0-d3, \B - sfi_breg src, neon_load_multi d0-d3, \B - sfi_breg dst, neon_store_multi d4-d7, \B - sfi_breg src, neon_load_multi d4-d7, \B + pld [src, #(4 * 64)] + neon_store_multi d0-d3, dst + neon_load_multi d0-d3, src + neon_store_multi d4-d7, dst + neon_load_multi d4-d7, src subs count, count, #64 bpl 1b 2: - sfi_breg dst, neon_store_multi d0-d3, \B - sfi_breg dst, neon_store_multi d4-d7, \B + neon_store_multi d0-d3, dst + neon_store_multi d4-d7, dst ands count, count, #0x3f #else /* Use an SMS style loop to maximize the I/O bandwidth. */ sub src, src, #4 sub dst, dst, #8 subs tmp2, count, #64 /* Use tmp2 for count. */ - sfi_breg src, \ - ldr A_l, [\B, #4] - sfi_breg src, \ - ldr A_h, [\B, #8] + ldr A_l, [src, #4] + ldr A_h, [src, #8] strd B_l, B_h, [sp, #8] cfi_rel_offset (B_l, 8) cfi_rel_offset (B_h, 12) - sfi_breg src, \ - ldr B_l, [\B, #12] - sfi_breg src, \ - ldr B_h, [\B, #16] + ldr B_l, [src, #12] + ldr B_h, [src, #16] strd C_l, C_h, [sp, #16] cfi_rel_offset (C_l, 16) cfi_rel_offset (C_h, 20) - sfi_breg src, \ - ldr C_l, [\B, #20] - sfi_breg src, \ - ldr C_h, [\B, #24] + ldr C_l, [src, #20] + ldr C_h, [src, #24] strd D_l, D_h, [sp, #24] cfi_rel_offset (D_l, 24) cfi_rel_offset (D_h, 28) - sfi_breg src, \ - ldr D_l, [\B, #28] - sfi_breg src, \ - ldr D_h, [\B, #32]! + ldr D_l, [src, #28] + ldr D_h, [src, #32]! b 1f .p2align 6 2: - sfi_pld src, #(5 * 64) - (32 - 4) - sfi_breg dst, \ - strd A_l, A_h, [\B, #40] - sfi_breg src, \ - ldr A_l, [\B, #36] - sfi_breg src, \ - ldr A_h, [\B, #40] - sfi_breg dst, \ - strd B_l, B_h, [\B, #48] - sfi_breg src, \ - ldr B_l, [\B, #44] - sfi_breg src, \ - ldr B_h, [\B, #48] - sfi_breg dst, \ - strd C_l, C_h, [\B, #56] - sfi_breg src, \ - ldr C_l, [\B, #52] - sfi_breg src, \ - ldr C_h, [\B, #56] - sfi_breg dst, \ - strd D_l, D_h, [\B, #64]! - sfi_breg src, \ - ldr D_l, [\B, #60] - sfi_breg src, \ - ldr D_h, [\B, #64]! + pld [src, #(5 * 64) - (32 - 4)] + strd A_l, A_h, [dst, #40] + ldr A_l, [src, #36] + ldr A_h, [src, #40] + strd B_l, B_h, [dst, #48] + ldr B_l, [src, #44] + ldr B_h, [src, #48] + strd C_l, C_h, [dst, #56] + ldr C_l, [src, #52] + ldr C_h, [src, #56] + strd D_l, D_h, [dst, #64]! + ldr D_l, [src, #60] + ldr D_h, [src, #64]! subs tmp2, tmp2, #64 1: - sfi_breg dst, \ - strd A_l, A_h, [\B, #8] - sfi_breg src, \ - ldr A_l, [\B, #4] - sfi_breg src, \ - ldr A_h, [\B, #8] - sfi_breg dst, \ - strd B_l, B_h, [\B, #16] - sfi_breg src, \ - ldr B_l, [\B, #12] - sfi_breg src, \ - ldr B_h, [\B, #16] - sfi_breg dst, \ - strd C_l, C_h, [\B, #24] - sfi_breg src, \ - ldr C_l, [\B, #20] - sfi_breg src, \ - ldr C_h, [\B, #24] - sfi_breg dst, \ - strd D_l, D_h, [\B, #32] - sfi_breg src, \ - ldr D_l, [\B, #28] - sfi_breg src, \ - ldr D_h, [\B, #32] + strd A_l, A_h, [dst, #8] + ldr A_l, [src, #4] + ldr A_h, [src, #8] + strd B_l, B_h, [dst, #16] + ldr B_l, [src, #12] + ldr B_h, [src, #16] + strd C_l, C_h, [dst, #24] + ldr C_l, [src, #20] + ldr C_h, [src, #24] + strd D_l, D_h, [dst, #32] + ldr D_l, [src, #28] + ldr D_h, [src, #32] bcs 2b /* Save the remaining bytes and restore the callee-saved regs. */ - sfi_breg dst, \ - strd A_l, A_h, [\B, #40] + strd A_l, A_h, [dst, #40] add src, src, #36 - sfi_breg dst, \ - strd B_l, B_h, [\B, #48] + strd B_l, B_h, [dst, #48] ldrd B_l, B_h, [sp, #8] cfi_restore (B_l) cfi_restore (B_h) - sfi_breg dst, \ - strd C_l, C_h, [\B, #56] + strd C_l, C_h, [dst, #56] ldrd C_l, C_h, [sp, #16] cfi_restore (C_l) cfi_restore (C_h) - sfi_breg dst, \ - strd D_l, D_h, [\B, #64] + strd D_l, D_h, [dst, #64] ldrd D_l, D_h, [sp, #24] cfi_restore (D_l) cfi_restore (D_h) diff --git a/sysdeps/arm/armv7/multiarch/memcpy_neon.S b/sysdeps/arm/armv7/multiarch/memcpy_neon.S index e60d1cc0e1..1a8d8bbe9e 100644 --- a/sysdeps/arm/armv7/multiarch/memcpy_neon.S +++ b/sysdeps/arm/armv7/multiarch/memcpy_neon.S @@ -1,8 +1,8 @@ -#ifdef __ARM_NEON__ -/* Under __ARM_NEON__, this file defines memcpy directly. */ -libc_hidden_builtin_def (memcpy) -#else +/* For __ARM_NEON__ this file defines memcpy. */ +#ifndef __ARM_NEON__ # define memcpy __memcpy_neon +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(a) #endif #define MEMCPY_NEON diff --git a/sysdeps/arm/armv7/multiarch/memcpy_vfp.S b/sysdeps/arm/armv7/multiarch/memcpy_vfp.S index e008c041ed..d1e9ede439 100644 --- a/sysdeps/arm/armv7/multiarch/memcpy_vfp.S +++ b/sysdeps/arm/armv7/multiarch/memcpy_vfp.S @@ -1,7 +1,9 @@ -/* Under __ARM_NEON__, memcpy_neon.S defines memcpy directly +/* Under __ARM_NEON__ memcpy_neon.S defines memcpy directly and the __memcpy_vfp code will never be used. */ #ifndef __ARM_NEON__ # define MEMCPY_VFP # define memcpy __memcpy_vfp +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(a) # include "memcpy_impl.S" #endif diff --git a/sysdeps/arm/armv7/multiarch/rtld-memchr.S b/sysdeps/arm/armv7/multiarch/rtld-memchr.S new file mode 100644 index 0000000000..ae8e5f04c4 --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/rtld-memchr.S @@ -0,0 +1 @@ +#include <sysdeps/arm/armv6t2/memchr.S> diff --git a/sysdeps/arm/armv7/multiarch/rtld-memcpy.S b/sysdeps/arm/armv7/multiarch/rtld-memcpy.S new file mode 100644 index 0000000000..ca2387531b --- /dev/null +++ b/sysdeps/arm/armv7/multiarch/rtld-memcpy.S @@ -0,0 +1 @@ +#include <sysdeps/arm/armv7/multiarch/memcpy_impl.S> diff --git a/sysdeps/arm/armv7/strcmp.S b/sysdeps/arm/armv7/strcmp.S index 5bcaf21ee2..2626fdf72e 100644 --- a/sysdeps/arm/armv7/strcmp.S +++ b/sysdeps/arm/armv7/strcmp.S @@ -1,5 +1,5 @@ /* strcmp implementation for ARMv7-A, optimized for Cortex-A15. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -83,8 +83,6 @@ #define syndrome tmp2 -#ifndef NO_THUMB -/* This code is best on Thumb. */ .thumb /* In Thumb code we can't use MVN with a register shift, but we do have ORN. */ @@ -94,27 +92,6 @@ .macro apply_mask data_reg, mask_reg orn \data_reg, \data_reg, \mask_reg .endm -#else -/* In ARM code we don't have ORN, but we can use MVN with a register shift. */ -.macro prepare_mask mask_reg, nbits_reg - mvn \mask_reg, const_m1, S2HI \nbits_reg -.endm -.macro apply_mask data_reg, mask_reg - orr \data_reg, \data_reg, \mask_reg -.endm - -/* These clobber the condition codes, which the real Thumb cbz/cbnz - instructions do not. But it doesn't matter for any of the uses here. */ -.macro cbz reg, label - cmp \reg, #0 - beq \label -.endm -.macro cbnz reg, label - cmp \reg, #0 - bne \label -.endm -#endif - /* Macro to compute and return the result value for word-aligned cases. */ @@ -178,10 +155,8 @@ #endif ENTRY (strcmp) #if STRCMP_PRECHECK == 1 - sfi_breg src1, \ - ldrb r2, [\B] - sfi_breg src2, \ - ldrb r3, [\B] + ldrb r2, [src1] + ldrb r3, [src2] cmp r2, #1 it cs cmpcs r2, r3 @@ -211,11 +186,9 @@ ENTRY (strcmp) and tmp2, tmp1, #3 bic src2, src2, #7 lsl tmp2, tmp2, #3 /* Bytes -> bits. */ - sfi_breg src1, \ - ldrd data1a, data1b, [\B], #16 + ldrd data1a, data1b, [src1], #16 tst tmp1, #4 - sfi_breg src2, \ - ldrd data2a, data2b, [\B], #16 + ldrd data2a, data2b, [src2], #16 prepare_mask tmp1, tmp2 apply_mask data1a, tmp1 apply_mask data2a, tmp1 @@ -231,10 +204,8 @@ ENTRY (strcmp) .p2align 5,,12 /* Don't start in the tail bytes of a cache line. */ .p2align 2 /* Always word aligned. */ .Lloop_aligned8: - sfi_breg src1, \ - ldrd data1a, data1b, [\B], #16 - sfi_breg src2, \ - ldrd data2a, data2b, [\B], #16 + ldrd data1a, data1b, [src1], #16 + ldrd data2a, data2b, [src2], #16 .Lstart_realigned8: uadd8 syndrome_b, data1a, const_m1 /* Only want GE bits, */ eor syndrome_a, data1a, data2a @@ -245,10 +216,8 @@ ENTRY (strcmp) sel syndrome_b, syndrome_b, const_m1 cbnz syndrome_b, .Ldiff_in_b - sfi_breg src1, \ - ldrd data1a, data1b, [\B, #-8] - sfi_breg src2, \ - ldrd data2a, data2b, [\B, #-8] + ldrd data1a, data1b, [src1, #-8] + ldrd data2a, data2b, [src2, #-8] uadd8 syndrome_b, data1a, const_m1 /* Only want GE bits, */ eor syndrome_a, data1a, data2a sel syndrome_a, syndrome_a, const_m1 @@ -279,19 +248,15 @@ ENTRY (strcmp) /* Unrolled by a factor of 2, to reduce the number of post-increment operations. */ .Lloop_aligned4: - sfi_breg src1, \ - ldr data1, [\B], #8 - sfi_breg src2, \ - ldr data2, [\B], #8 + ldr data1, [src1], #8 + ldr data2, [src2], #8 .Lstart_realigned4: uadd8 syndrome, data1, const_m1 /* Only need GE bits. */ eor syndrome, data1, data2 sel syndrome, syndrome, const_m1 cbnz syndrome, .Laligned4_done - sfi_breg src1, \ - ldr data1, [\B, #-4] - sfi_breg src2, \ - ldr data2, [\B, #-4] + ldr data1, [src1, #-4] + ldr data2, [src2, #-4] uadd8 syndrome, data1, const_m1 eor syndrome, data1, data2 sel syndrome, syndrome, const_m1 @@ -307,11 +272,9 @@ ENTRY (strcmp) masking off the unwanted loaded data to prevent a difference. */ lsl tmp1, tmp1, #3 /* Bytes -> bits. */ bic src1, src1, #3 - sfi_breg src1, \ - ldr data1, [\B], #8 + ldr data1, [src1], #8 bic src2, src2, #3 - sfi_breg src2, \ - ldr data2, [\B], #8 + ldr data2, [src2], #8 prepare_mask tmp1, tmp1 apply_mask data1, tmp1 @@ -324,30 +287,26 @@ ENTRY (strcmp) sub src2, src2, tmp1 bic src1, src1, #3 lsls tmp1, tmp1, #31 - sfi_breg src1, \ - ldr data1, [\B], #4 + ldr data1, [src1], #4 beq .Laligned_m2 bcs .Laligned_m1 #if STRCMP_PRECHECK == 0 - sfi_breg src2, \ - ldrb data2, [\B, #1] + ldrb data2, [src2, #1] uxtb tmp1, data1, ror #BYTE1_OFFSET subs tmp1, tmp1, data2 bne .Lmisaligned_exit cbz data2, .Lmisaligned_exit .Laligned_m2: - sfi_breg src2, \ - ldrb data2, [\B, #2] + ldrb data2, [src2, #2] uxtb tmp1, data1, ror #BYTE2_OFFSET subs tmp1, tmp1, data2 bne .Lmisaligned_exit cbz data2, .Lmisaligned_exit .Laligned_m1: - sfi_breg src2, \ - ldrb data2, [\B, #3] + ldrb data2, [src2, #3] uxtb tmp1, data1, ror #BYTE3_OFFSET subs tmp1, tmp1, data2 bne .Lmisaligned_exit @@ -356,16 +315,14 @@ ENTRY (strcmp) #else /* STRCMP_PRECHECK */ /* If we've done the pre-check, then we don't need to check the first byte again here. */ - sfi_breg src2, \ - ldrb data2, [\B, #2] + ldrb data2, [src2, #2] uxtb tmp1, data1, ror #BYTE2_OFFSET subs tmp1, tmp1, data2 bne .Lmisaligned_exit cbz data2, .Lmisaligned_exit .Laligned_m2: - sfi_breg src2, \ - ldrb data2, [\B, #3] + ldrb data2, [src2, #3] uxtb tmp1, data1, ror #BYTE3_OFFSET subs tmp1, tmp1, data2 bne .Lmisaligned_exit @@ -391,13 +348,11 @@ ENTRY (strcmp) cfi_restore_state /* src1 is word aligned, but src2 has no common alignment with it. */ - sfi_breg src1, \ - ldr data1, [\B], #4 + ldr data1, [src1], #4 lsls tmp1, src2, #31 /* C=src2[1], Z=src2[0]. */ bic src2, src2, #3 - sfi_breg src2, \ - ldr data2, [\B], #4 + ldr data2, [src2], #4 bhi .Loverlap1 /* C=1, Z=0 => src2[1:0] = 0b11. */ bcs .Loverlap2 /* C=1, Z=1 => src2[1:0] = 0b10. */ @@ -409,13 +364,11 @@ ENTRY (strcmp) sel syndrome, syndrome, const_m1 bne 4f cbnz syndrome, 5f - sfi_breg src2, \ - ldr data2, [\B], #4 + ldr data2, [src2], #4 eor tmp1, tmp1, data1 cmp tmp1, data2, S2HI #24 bne 6f - sfi_breg src1, \ - ldr data1, [\B], #4 + ldr data1, [src1], #4 b .Loverlap3 4: S2LO data2, data2, #8 @@ -427,8 +380,7 @@ ENTRY (strcmp) /* We can only get here if the MSB of data1 contains 0, so fast-path the exit. */ - sfi_breg src2, \ - ldrb result, [\B] + ldrb result, [src2] ldrd r4, r5, [sp], #16 cfi_remember_state cfi_def_cfa_offset (0) @@ -454,13 +406,11 @@ ENTRY (strcmp) sel syndrome, syndrome, const_m1 bne 4f cbnz syndrome, 5f - sfi_breg src2, \ - ldr data2, [\B], #4 + ldr data2, [src2], #4 eor tmp1, tmp1, data1 cmp tmp1, data2, S2HI #16 bne 6f - sfi_breg src1, \ - ldr data1, [\B], #4 + ldr data1, [src1], #4 b .Loverlap2 4: S2LO data2, data2, #16 @@ -469,8 +419,7 @@ ENTRY (strcmp) ands syndrome, syndrome, const_m1, S2LO #16 bne .Lstrcmp_done_equal - sfi_breg src2, \ - ldrh data2, [\B] + ldrh data2, [src2] S2LO data1, data1, #16 #ifdef __ARM_BIG_ENDIAN lsl data2, data2, #16 @@ -490,13 +439,11 @@ ENTRY (strcmp) sel syndrome, syndrome, const_m1 bne 4f cbnz syndrome, 5f - sfi_breg src2, \ - ldr data2, [\B], #4 + ldr data2, [src2], #4 eor tmp1, tmp1, data1 cmp tmp1, data2, S2HI #8 bne 6f - sfi_breg src1, \ - ldr data1, [\B], #4 + ldr data1, [src1], #4 b .Loverlap1 4: S2LO data2, data2, #24 @@ -504,8 +451,7 @@ ENTRY (strcmp) 5: tst syndrome, #LSB bne .Lstrcmp_done_equal - sfi_breg src2, \ - ldr data2, [\B] + ldr data2, [src2] 6: S2LO data1, data1, #8 bic data2, data2, #MSB diff --git a/sysdeps/arm/atomic-machine.h b/sysdeps/arm/atomic-machine.h index dd5e7141a4..ddc30198bf 100644 --- a/sysdeps/arm/atomic-machine.h +++ b/sysdeps/arm/atomic-machine.h @@ -1,5 +1,5 @@ /* Atomic operations. Pure ARM version. - Copyright (C) 2002-2016 Free Software Foundation, Inc. + 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 @@ -35,6 +35,7 @@ typedef uintmax_t uatomic_max_t; #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 +#define ATOMIC_EXCHANGE_USES_CAS 1 void __arm_link_error (void); @@ -87,10 +88,6 @@ void __arm_link_error (void); /* Compare and exchange with "release" semantics, ie barrier before. */ -# define atomic_compare_and_exchange_bool_rel(mem, new, old) \ - __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \ - mem, new, old, __ATOMIC_RELEASE) - # define atomic_compare_and_exchange_val_rel(mem, new, old) \ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \ mem, new, old, __ATOMIC_RELEASE) diff --git a/sysdeps/arm/backtrace.c b/sysdeps/arm/backtrace.c index a06a01a996..e27d3d1391 100644 --- a/sysdeps/arm/backtrace.c +++ b/sysdeps/arm/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazu Hirata <kazu@codesourcery.com>, 2008. diff --git a/sysdeps/arm/bits/fenv.h b/sysdeps/arm/bits/fenv.h index 8e89fc1819..766b310efd 100644 --- a/sysdeps/arm/bits/fenv.h +++ b/sysdeps/arm/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2016 Free Software Foundation, Inc. +/* Copyright (C) 2004-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 @@ -80,3 +80,11 @@ fenv_t; /* Floating-point environment where none of the exceptions are masked. */ # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif + +#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/arm/bits/link.h b/sysdeps/arm/bits/link.h index 6446decaf3..97ddca79f7 100644 --- a/sysdeps/arm/bits/link.h +++ b/sysdeps/arm/bits/link.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/bits/mathdef.h b/sysdeps/arm/bits/mathdef.h deleted file mode 100644 index ae0bcb7bf5..0000000000 --- a/sysdeps/arm/bits/mathdef.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1999-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#if !defined _MATH_H && !defined _COMPLEX_H -# error "Never use <bits/mathdef.h> directly; include <math.h> instead" -#endif - -#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF -# define _MATH_H_MATHDEF 1 - -/* GCC does not promote `float' values to `double'. */ -typedef float float_t; /* `float' expressions are evaluated as - `float'. */ -typedef double double_t; /* `double' expressions are evaluated as - `double'. */ - -/* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 (-2147483647) -# define FP_ILOGBNAN (2147483647) - -/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} - builtins are supported. */ -# ifdef __FP_FAST_FMA -# define FP_FAST_FMA 1 -# endif - -# ifdef __FP_FAST_FMAF -# define FP_FAST_FMAF 1 -# endif - -# ifdef __FP_FAST_FMAL -# define FP_FAST_FMAL 1 -# endif - -#endif /* ISO C99 */ - -#ifndef __NO_LONG_DOUBLE_MATH -/* Signal that we do not really have a `long double'. This disables the - declaration of all the `long double' function variants. */ -# define __NO_LONG_DOUBLE_MATH 1 -#endif diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h index ba0ea9208e..952a623111 100644 --- a/sysdeps/arm/bits/setjmp.h +++ b/sysdeps/arm/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2016 Free Software Foundation, Inc. +/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S index 51d3d975c7..ae93d3d97d 100644 --- a/sysdeps/arm/bsd-_setjmp.S +++ b/sysdeps/arm/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S index f8a5229a27..06efc79b85 100644 --- a/sysdeps/arm/bsd-setjmp.S +++ b/sysdeps/arm/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/crti.S b/sysdeps/arm/crti.S index abbc76d572..a1424d0333 100644 --- a/sysdeps/arm/crti.S +++ b/sysdeps/arm/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for ARM. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + 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 @@ -78,6 +78,7 @@ call_weak_fn: .section .init,"ax",%progbits .p2align 2 .globl _init + .hidden _init .type _init, %function _init: push {r3, lr} @@ -90,6 +91,7 @@ _init: .section .fini,"ax",%progbits .p2align 2 .globl _fini + .hidden _fini .type _fini, %function _fini: push {r3, lr} diff --git a/sysdeps/arm/crtn.S b/sysdeps/arm/crtn.S index b8c2359d2f..26027693ce 100644 --- a/sysdeps/arm/crtn.S +++ b/sysdeps/arm/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for ARM. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + 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 diff --git a/sysdeps/arm/dl-irel.h b/sysdeps/arm/dl-irel.h index d5374e79f5..a7b6456075 100644 --- a/sysdeps/arm/dl-irel.h +++ b/sysdeps/arm/dl-irel.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF indirect relocation inline functions. ARM version. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + 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 diff --git a/sysdeps/arm/dl-lookupcfg.h b/sysdeps/arm/dl-lookupcfg.h index 460dc2b187..7e8fafc8a6 100644 --- a/sysdeps/arm/dl-lookupcfg.h +++ b/sysdeps/arm/dl-lookupcfg.h @@ -1,5 +1,5 @@ /* Configuration of lookup functions. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + 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 @@ -22,6 +22,6 @@ struct link_map; -extern void internal_function _dl_unmap (struct link_map *map); +extern void _dl_unmap (struct link_map *map); #define DL_UNMAP(map) _dl_unmap (map) diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 0905adda7a..1a4fd3f17b 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. ARM version. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + 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 @@ -53,14 +53,29 @@ elf_machine_dynamic (void) static inline Elf32_Addr __attribute__ ((unused)) elf_machine_load_address (void) { - extern Elf32_Addr internal_function __dl_start (void *) asm ("_dl_start"); - Elf32_Addr got_addr = (Elf32_Addr) &__dl_start; Elf32_Addr pcrel_addr; +#ifdef SHARED + extern Elf32_Addr __dl_start (void *) asm ("_dl_start"); + Elf32_Addr got_addr = (Elf32_Addr) &__dl_start; + asm ("adr %0, _dl_start" : "=r" (pcrel_addr)); +#else + extern Elf32_Addr __dl_relocate_static_pie (void *) + asm ("_dl_relocate_static_pie") attribute_hidden; + Elf32_Addr got_addr = (Elf32_Addr) &__dl_relocate_static_pie; + asm ("adr %0, _dl_relocate_static_pie" : "=r" (pcrel_addr)); +#endif #ifdef __thumb__ - /* Clear the low bit of the funciton address. */ + /* Clear the low bit of the function address. + + NOTE: got_addr is from GOT table whose lsb is always set by linker if it's + Thumb function address. PCREL_ADDR comes from PC-relative calculation + which will finish during assembling. GAS assembler before the fix for + PR gas/21458 was not setting the lsb but does after that. Always do the + strip for both, so the code works with various combinations of glibc and + Binutils. */ got_addr &= ~(Elf32_Addr) 1; + pcrel_addr &= ~(Elf32_Addr) 1; #endif - asm ("adr %0, _dl_start" : "=r" (pcrel_addr)); return pcrel_addr - got_addr; } @@ -112,10 +127,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) got[2] = (Elf32_Addr) &_dl_runtime_resolve; } - if (l->l_info[ADDRIDX (DT_TLSDESC_GOT)] && lazy) - *(Elf32_Addr*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr) - = (Elf32_Addr) &_dl_tlsdesc_lazy_resolver; - return lazy; } @@ -263,6 +274,7 @@ dl_platform_init (void) 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_Rel *reloc, Elf32_Addr *reloc_addr, Elf32_Addr value) { @@ -380,7 +392,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, { const Elf32_Sym *const refsym = sym; struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); - Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; + Elf32_Addr value = SYMBOL_ADDRESS (sym_map, sym, true); if (sym != NULL && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) @@ -440,7 +452,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, binding found in the user program or a loaded library rather than the dynamic linker's built-in definitions used while loading those libraries. */ - value -= map->l_addr + refsym->st_value; + value -= SYMBOL_ADDRESS (map, refsym, true); # endif /* Support relocations on mis-aligned offsets. */ ((struct unaligned *) reloc_addr)->x += value; @@ -448,8 +460,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, } case R_ARM_TLS_DESC: { - struct tlsdesc volatile *td = - (struct tlsdesc volatile *)reloc_addr; + struct tlsdesc *td = (struct tlsdesc *)reloc_addr; # ifndef RTLD_BOOTSTRAP if (! sym) @@ -542,7 +553,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, const Elf32_Sym *const refsym = sym; # endif struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); - Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; + Elf32_Addr value = SYMBOL_ADDRESS (sym_map, sym, true); if (sym != NULL && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) @@ -578,32 +589,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_ARM_ABS32: *reloc_addr = value + reloc->r_addend; break; -# ifdef RESOLVE_CONFLICT_FIND_MAP - case R_ARM_TLS_DESC: - { - struct tlsdesc volatile *td = - (struct tlsdesc volatile *) reloc_addr; - - RESOLVE_CONFLICT_FIND_MAP (map, reloc_addr); - - /* Make sure we know what's going on. */ - assert (td->entry - == (void *) (D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)]) - + map->l_addr)); - assert (map->l_info[ADDRIDX (DT_TLSDESC_GOT)]); - - /* Set up the lazy resolver and store the pointer to our link - map in _GLOBAL_OFFSET_TABLE[1] now as for a prelinked - binary elf_machine_runtime_setup() is not called and hence - neither has been initialized. */ - *(Elf32_Addr *) (D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_GOT)]) - + map->l_addr) - = (Elf32_Addr) &_dl_tlsdesc_lazy_resolver; - ((Elf32_Addr *) D_PTR (map, l_info[DT_PLTGOT]))[1] - = (Elf32_Addr) map; - } - break; -# endif /* RESOLVE_CONFLICT_FIND_MAP */ case R_ARM_PC24: relocate_pc24 (map, value, reloc_addr, reloc->r_addend); break; @@ -679,17 +664,21 @@ elf_machine_lazy_rel (struct link_map *map, } else if (__builtin_expect (r_type == R_ARM_TLS_DESC, 1)) { - struct tlsdesc volatile *td = - (struct tlsdesc volatile *)reloc_addr; - - /* The linker must have given us the parameter we need in the - first GOT entry, and left the second one empty. The latter - will have been preset by the prelinker if used though. - We fill it with the resolver address. */ - assert (td->entry == 0 - || map->l_info[VALIDX (DT_GNU_PRELINKED)] != NULL); - td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)]) - + map->l_addr); + const Elf_Symndx symndx = ELFW (R_SYM) (reloc->r_info); + const ElfW (Sym) *symtab = (const void *)D_PTR (map, l_info[DT_SYMTAB]); + const ElfW (Sym) *sym = &symtab[symndx]; + const struct r_found_version *version = NULL; + + if (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) + { + const ElfW (Half) *vernum = + (const void *)D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); + version = &map->l_versions[vernum[symndx] & 0x7fff]; + } + + /* Always initialize TLS descriptors completely, because lazy + initialization requires synchronization at every TLS access. */ + elf_machine_rel (map, reloc, sym, version, reloc_addr, skip_ifunc); } else _dl_reloc_bad_type (map, r_type, 1); diff --git a/sysdeps/arm/dl-sysdep.h b/sysdeps/arm/dl-sysdep.h index f4b55da765..eef6b38162 100644 --- a/sysdeps/arm/dl-sysdep.h +++ b/sysdeps/arm/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Alpha version. - Copyright (C) 2002-2016 Free Software Foundation, Inc. + 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 diff --git a/sysdeps/arm/dl-tls.h b/sysdeps/arm/dl-tls.h index ed2efe8c18..b591c6b095 100644 --- a/sysdeps/arm/dl-tls.h +++ b/sysdeps/arm/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. ARM version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,6 +26,3 @@ typedef struct dl_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/arm/dl-tlsdesc.S b/sysdeps/arm/dl-tlsdesc.S index 0429b0106c..056e17d52d 100644 --- a/sysdeps/arm/dl-tlsdesc.S +++ b/sysdeps/arm/dl-tlsdesc.S @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. ARM version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + 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 @@ -32,8 +32,7 @@ eabi_fnstart .align 2 _dl_tlsdesc_return: - sfi_breg r0, \ - ldr r0, [\B] + ldr r0, [r0] BX (lr) eabi_fnend cfi_endproc @@ -92,30 +91,23 @@ _dl_tlsdesc_dynamic: cfi_rel_offset (r3,4) cfi_rel_offset (r4,8) cfi_rel_offset (lr,12) - sfi_breg r0, \ - ldr r1, [\B] /* td */ + ldr r1, [r0] /* td */ GET_TLS (lr) mov r4, r0 /* r4 = tp */ - sfi_breg r0, \ - ldr r0, [\B] - sfi_breg r1, \ - ldr r2, [\B, #8] /* gen_count */ - sfi_breg r0, \ - ldr r3, [\B] + ldr r0, [r0] + ldr r2, [r1, #8] /* gen_count */ + ldr r3, [r0] cmp r2, r3 bhi 1f - sfi_breg r1, \ - ldr r3, [\B] + ldr r3, [r1] #ifndef ARM_NO_INDEX_REGISTER ldr r2, [r0, r3, lsl #3] #else add lr, r0, r3, lsl #3 - sfi_breg lr, \ - ldr r2, [\B] + ldr r2, [lr] #endif cmn r2, #1 ittt ne - sfi_breg r1, \ ldrne r3, [r1, #4] addne r3, r2, r3 rsbne r0, r4, r3 @@ -140,89 +132,3 @@ _dl_tlsdesc_dynamic: cfi_endproc .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic #endif /* SHARED */ - -/* lazy resolved for tls descriptors. */ - .hidden _dl_tlsdesc_lazy_resolver - .global _dl_tlsdesc_lazy_resolver - .type _dl_tlsdesc_lazy_resolver,#function - cfi_startproc - eabi_fnstart - .align 2 -_dl_tlsdesc_lazy_resolver: - /* r0 points at the tlsdesc, - r1 points at the GOT - r2 was pushed by the trampoline and used as a temp, - we need to pop it here. - We push the remaining call-clobbered registers here, and also - R1 -- to keep the stack correctly aligned. */ - /* Tell the unwinder that r2 has already been pushed. */ - eabi_save ({r2}) - cfi_adjust_cfa_offset (4) - cfi_rel_offset (r2, 0) - eabi_save ({r0,r1,r3,ip,lr}) - push {r0, r1, r3, ip, lr} - cfi_adjust_cfa_offset (20) - cfi_rel_offset (r0, 0) - cfi_rel_offset (r1, 4) - cfi_rel_offset (r3, 8) - cfi_rel_offset (ip, 12) - cfi_rel_offset (lr, 16) - bl _dl_tlsdesc_lazy_resolver_fixup - pop {r0, r1, r3, ip, lr} - cfi_adjust_cfa_offset (-20) - cfi_restore (lr) - cfi_restore (ip) - cfi_restore (r3) - cfi_restore (r1) - cfi_restore (r0) - pop {r2} - cfi_adjust_cfa_offset (-4) - cfi_restore (r2) - sfi_breg r0, \ - ldr r1, [\B, #4] - BX (r1) - eabi_fnend - cfi_endproc - .size _dl_tlsdesc_lazy_resolver, .-_dl_tlsdesc_lazy_resolver - -/* Holder for lazy tls descriptors being resolve in another thread. - - Our calling convention is to clobber r0, r1 and the processor - flags. All others that are modified must be saved */ - .hidden _dl_tlsdesc_resolve_hold - .global _dl_tlsdesc_resolve_hold - .type _dl_tlsdesc_resolve_hold,#function - cfi_startproc - eabi_fnstart - .align 2 -_dl_tlsdesc_resolve_hold: - /* r0 is saved so its original value can be used after the call and - r1 is saved only to keep the stack aligned. (r0 points to the tls - descriptor, it is passed to _dl_tlsdesc_resolve_hold_fixup which - is a void function that may clobber r0, later r0 is used to load - the new resolver.) */ - eabi_save ({r0,r1,r2,r3,ip,lr}) - push {r0, r1, r2, r3, ip, lr} - cfi_adjust_cfa_offset (24) - cfi_rel_offset (r0, 0) - cfi_rel_offset (r1, 4) - cfi_rel_offset (r2, 8) - cfi_rel_offset (r3, 12) - cfi_rel_offset (ip, 16) - cfi_rel_offset (lr, 20) - adr r1, _dl_tlsdesc_resolve_hold - bl _dl_tlsdesc_resolve_hold_fixup - pop {r0, r1, r2, r3, ip, lr} - cfi_adjust_cfa_offset (-24) - cfi_restore (lr) - cfi_restore (ip) - cfi_restore (r3) - cfi_restore (r2) - cfi_restore (r1) - cfi_restore (r0) - sfi_breg r0, \ - ldr r1, [\B, #4] - BX (r1) - eabi_fnend - cfi_endproc - .size _dl_tlsdesc_resolve_hold, .-_dl_tlsdesc_resolve_hold diff --git a/sysdeps/arm/dl-tlsdesc.h b/sysdeps/arm/dl-tlsdesc.h index b4949943cc..fc8c5b4ee6 100644 --- a/sysdeps/arm/dl-tlsdesc.h +++ b/sysdeps/arm/dl-tlsdesc.h @@ -1,6 +1,6 @@ /* Thread-local storage descriptor handling in the ELF dynamic linker. ARM version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -48,9 +48,7 @@ struct tlsdesc_dynamic_arg extern ptrdiff_t attribute_hidden _dl_tlsdesc_return(struct tlsdesc *), - _dl_tlsdesc_undefweak(struct tlsdesc *), - _dl_tlsdesc_resolve_hold(struct tlsdesc *), - _dl_tlsdesc_lazy_resolver(struct tlsdesc *); + _dl_tlsdesc_undefweak(struct tlsdesc *); # ifdef SHARED extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset); diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S index 3c75be738e..c731b01286 100644 --- a/sysdeps/arm/dl-trampoline.S +++ b/sysdeps/arm/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. ARM version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/e_sqrt.c b/sysdeps/arm/e_sqrt.c new file mode 100644 index 0000000000..44e0414306 --- /dev/null +++ b/sysdeps/arm/e_sqrt.c @@ -0,0 +1,45 @@ +/* Compute square root for double. ARM 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/>. */ + +#ifdef __SOFTFP__ + +/* Use architecture-indendent sqrt implementation. */ +# include <sysdeps/ieee754/dbl-64/e_sqrt.c> + +#else + +/* Use VFP square root instruction. */ +# include <math.h> +# include <sysdep.h> + +double +__ieee754_sqrt (double x) +{ + double ret; +# if __ARM_ARCH >= 6 + asm ("vsqrt.f64 %P0, %P1" : "=w" (ret) : "w" (x)); +# else + /* As in GCC, for VFP9 Erratum 760019 avoid overwriting the + input. */ + asm ("vsqrt.f64 %P0, %P1" : "=&w" (ret) : "w" (x)); +# endif + return ret; +} +strong_alias (__ieee754_sqrt, __sqrt_finite) + +#endif diff --git a/sysdeps/arm/e_sqrtf.c b/sysdeps/arm/e_sqrtf.c new file mode 100644 index 0000000000..e7c3072235 --- /dev/null +++ b/sysdeps/arm/e_sqrtf.c @@ -0,0 +1,45 @@ +/* Compute square root for float. ARM 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/>. */ + +#ifdef __SOFTFP__ + +/* Use architecture-indendent sqrtf implementation. */ +# include <sysdeps/ieee754/flt-32/e_sqrtf.c> + +#else + +/* Use VFP square root instruction. */ +# include <math.h> +# include <sysdep.h> + +float +__ieee754_sqrtf (float x) +{ + float ret; +# if __ARM_ARCH >= 6 + asm ("vsqrt.f32 %0, %1" : "=t" (ret) : "t" (x)); +# else + /* As in GCC, for VFP9 Erratum 760019 avoid overwriting the + input. */ + asm ("vsqrt.f32 %0, %1" : "=&t" (ret) : "t" (x)); +# endif + return ret; +} +strong_alias (__ieee754_sqrtf, __sqrtf_finite) + +#endif diff --git a/sysdeps/arm/fclrexcpt.c b/sysdeps/arm/fclrexcpt.c index 4db79bf1f6..61933581d1 100644 --- a/sysdeps/arm/fclrexcpt.c +++ b/sysdeps/arm/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/fedisblxcpt.c b/sysdeps/arm/fedisblxcpt.c index f16a3e8961..d4d683b027 100644 --- a/sysdeps/arm/fedisblxcpt.c +++ b/sysdeps/arm/fedisblxcpt.c @@ -1,5 +1,5 @@ /* Disable floating-point exceptions. - Copyright (C) 2001-2016 Free Software Foundation, Inc. + Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell <philb@gnu.org>, 2001. diff --git a/sysdeps/arm/feenablxcpt.c b/sysdeps/arm/feenablxcpt.c index f4e36f582e..a0d70455ab 100644 --- a/sysdeps/arm/feenablxcpt.c +++ b/sysdeps/arm/feenablxcpt.c @@ -1,5 +1,5 @@ /* Enable floating-point exceptions. - Copyright (C) 2001-2016 Free Software Foundation, Inc. + Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell <philb@gnu.org>, 2001. diff --git a/sysdeps/arm/fegetenv.c b/sysdeps/arm/fegetenv.c index ac2db2d99c..3b0af8da59 100644 --- a/sysdeps/arm/fegetenv.c +++ b/sysdeps/arm/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/fegetexcept.c b/sysdeps/arm/fegetexcept.c index 42ae7554f2..c788b603e8 100644 --- a/sysdeps/arm/fegetexcept.c +++ b/sysdeps/arm/fegetexcept.c @@ -1,5 +1,5 @@ /* Get floating-point exceptions. - Copyright (C) 2001-2016 Free Software Foundation, Inc. + Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell <philb@gnu.org>, 2001 diff --git a/sysdeps/arm/nacl/uname-values.h b/sysdeps/arm/fegetmode.c index 923971a3cd..c2297e26e7 100644 --- a/sysdeps/arm/nacl/uname-values.h +++ b/sysdeps/arm/fegetmode.c @@ -1,5 +1,5 @@ -/* Constant values for the uname function to return. NaCl/ARM version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. +/* Store current floating-point control modes. ARM 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 @@ -16,5 +16,14 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#define UNAME_MACHINE "arm" -#include <sysdeps/nacl/uname-values.h> +#include <fenv.h> +#include <fpu_control.h> +#include <arm-features.h> + +int +fegetmode (femode_t *modep) +{ + if (ARM_HAVE_VFP) + _FPU_GETCW (*modep); + return 0; +} diff --git a/sysdeps/arm/fegetround.c b/sysdeps/arm/fegetround.c index cdc4f934f9..610fb16827 100644 --- a/sysdeps/arm/fegetround.c +++ b/sysdeps/arm/fegetround.c @@ -1,5 +1,5 @@ /* Return current rounding direction. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/feholdexcpt.c b/sysdeps/arm/feholdexcpt.c index 2a0edfdd94..8c146af1c4 100644 --- a/sysdeps/arm/feholdexcpt.c +++ b/sysdeps/arm/feholdexcpt.c @@ -1,5 +1,5 @@ /* Store current floating-point environment and clear exceptions. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/fenv_private.h b/sysdeps/arm/fenv_private.h index b28a50f8b5..55157c8ae2 100644 --- a/sysdeps/arm/fenv_private.h +++ b/sysdeps/arm/fenv_private.h @@ -1,5 +1,5 @@ /* Private floating point rounding and exceptions handling. ARM VFP version. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/fesetenv.c b/sysdeps/arm/fesetenv.c index 6dbce2abc5..6c3475a479 100644 --- a/sysdeps/arm/fesetenv.c +++ b/sysdeps/arm/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/nptl/pthread_spin_lock.c b/sysdeps/arm/fesetexcept.c index ddb5411aa3..38557aaaac 100644 --- a/sysdeps/arm/nptl/pthread_spin_lock.c +++ b/sysdeps/arm/fesetexcept.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2008-2016 Free Software Foundation, Inc. +/* Set given exception flags. ARM 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 @@ -12,12 +13,26 @@ 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 + License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000 +#include <fenv.h> +#include <fpu_control.h> +#include <arm-features.h> -/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because - it will resolve to this very file. Using "sysdeps/.." as reference to the - top level directory does the job. */ -#include <sysdeps/../nptl/pthread_spin_lock.c> +int +fesetexcept (int excepts) +{ + fpu_control_t fpscr, new_fpscr; + + /* Fail if a VFP unit isn't present unless nothing needs to be done. */ + if (!ARM_HAVE_VFP) + return (excepts != 0); + + _FPU_GETCW (fpscr); + new_fpscr = fpscr | (excepts & FE_ALL_EXCEPT); + if (new_fpscr != fpscr) + _FPU_SETCW (new_fpscr); + + return 0; +} diff --git a/sysdeps/arm/fesetmode.c b/sysdeps/arm/fesetmode.c new file mode 100644 index 0000000000..1ba825416e --- /dev/null +++ b/sysdeps/arm/fesetmode.c @@ -0,0 +1,45 @@ +/* Install given floating-point control modes. ARM 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 <fenv.h> +#include <fpu_control.h> +#include <arm-features.h> + +/* NZCV flags, QC bit, IDC bit and bits for IEEE exception status. */ +#define FPU_STATUS_BITS 0xf800009f + +int +fesetmode (const femode_t *modep) +{ + fpu_control_t fpscr, new_fpscr; + + if (!ARM_HAVE_VFP) + /* Nothing to do. */ + return 0; + + _FPU_GETCW (fpscr); + if (modep == FE_DFL_MODE) + new_fpscr = (fpscr & (_FPU_RESERVED | FPU_STATUS_BITS)) | _FPU_DEFAULT; + else + new_fpscr = (fpscr & FPU_STATUS_BITS) | (*modep & ~FPU_STATUS_BITS); + + if (((new_fpscr ^ fpscr) & ~_FPU_MASK_NZCV) != 0) + _FPU_SETCW (new_fpscr); + + return 0; +} diff --git a/sysdeps/arm/fesetround.c b/sysdeps/arm/fesetround.c index ec6bc2d047..379dfdca9d 100644 --- a/sysdeps/arm/fesetround.c +++ b/sysdeps/arm/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/feupdateenv.c b/sysdeps/arm/feupdateenv.c index 8ec7b2912a..de71695c23 100644 --- a/sysdeps/arm/feupdateenv.c +++ b/sysdeps/arm/feupdateenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment and raise exceptions. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/arm/fgetexcptflg.c b/sysdeps/arm/fgetexcptflg.c index fb43ef4c83..8e831e979d 100644 --- a/sysdeps/arm/fgetexcptflg.c +++ b/sysdeps/arm/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/arm/find_exidx.c b/sysdeps/arm/find_exidx.c index 657d67ec96..f6f2290aaf 100644 --- a/sysdeps/arm/find_exidx.c +++ b/sysdeps/arm/find_exidx.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/fix-fp-int-convert-overflow.h b/sysdeps/arm/fix-fp-int-convert-overflow.h index c5ec50a433..3942e5b2c2 100644 --- a/sysdeps/arm/fix-fp-int-convert-overflow.h +++ b/sysdeps/arm/fix-fp-int-convert-overflow.h @@ -1,5 +1,5 @@ /* Fix for conversion of floating point to integer overflow. ARM version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h index 0fe532a797..6b1b176eae 100644 --- a/sysdeps/arm/fpu_control.h +++ b/sysdeps/arm/fpu_control.h @@ -1,5 +1,5 @@ /* FPU control word definitions. ARM VFP version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-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 @@ -53,12 +53,19 @@ extern fpu_control_t __fpu_control; typedef unsigned int fpu_control_t; /* Macros for accessing the hardware control word. */ +#ifdef __SOFTFP__ /* This is fmrx %0, fpscr. */ -#define _FPU_GETCW(cw) \ +# define _FPU_GETCW(cw) \ __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw)) /* This is fmxr fpscr, %0. */ -#define _FPU_SETCW(cw) \ +# define _FPU_SETCW(cw) \ __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw)) +#else +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("vmrs %0, fpscr" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("vmsr fpscr, %0" : : "r" (cw)) +#endif /* Default control word set at startup. */ extern fpu_control_t __fpu_control; diff --git a/sysdeps/arm/fraiseexcpt.c b/sysdeps/arm/fraiseexcpt.c index 0317e2a745..2558b21204 100644 --- a/sysdeps/arm/fraiseexcpt.c +++ b/sysdeps/arm/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/fsetexcptflg.c b/sysdeps/arm/fsetexcptflg.c index dd7507b48e..409ed2e98f 100644 --- a/sysdeps/arm/fsetexcptflg.c +++ b/sysdeps/arm/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/ftestexcept.c b/sysdeps/arm/ftestexcept.c index d871a9b6fc..3927c03acd 100644 --- a/sysdeps/arm/ftestexcept.c +++ b/sysdeps/arm/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/gcc-compat.h b/sysdeps/arm/gcc-compat.h index fdff40bad7..99bc8c4fa5 100644 --- a/sysdeps/arm/gcc-compat.h +++ b/sysdeps/arm/gcc-compat.h @@ -1,5 +1,5 @@ /* Macros for checking required GCC compatibility. ARM version. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/gccframe.h b/sysdeps/arm/gccframe.h index bf045b1100..dcfc60bac6 100644 --- a/sysdeps/arm/gccframe.h +++ b/sysdeps/arm/gccframe.h @@ -1,5 +1,5 @@ /* Definition of object in frame unwind info. arm version. - Copyright (C) 2001-2016 Free Software Foundation, Inc. + 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 diff --git a/sysdeps/arm/get-rounding-mode.h b/sysdeps/arm/get-rounding-mode.h index 796f1584c9..303147b507 100644 --- a/sysdeps/arm/get-rounding-mode.h +++ b/sysdeps/arm/get-rounding-mode.h @@ -1,5 +1,5 @@ /* Determine floating-point rounding mode within libc. ARM version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h index 6fa7a65a8c..2efeda260e 100644 --- a/sysdeps/arm/gmp-mparam.h +++ b/sysdeps/arm/gmp-mparam.h @@ -1,6 +1,6 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright (C) 1991-2016 Free Software Foundation, Inc. +Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU MP Library. diff --git a/sysdeps/arm/include/bits/setjmp.h b/sysdeps/arm/include/bits/setjmp.h index 66751213b5..b9e14d7477 100644 --- a/sysdeps/arm/include/bits/setjmp.h +++ b/sysdeps/arm/include/bits/setjmp.h @@ -1,5 +1,5 @@ /* Private jmp_buf-related definitions. ARM EABI version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/jmpbuf-unwind.h b/sysdeps/arm/jmpbuf-unwind.h index 25ea810b31..d7405b7643 100644 --- a/sysdeps/arm/jmpbuf-unwind.h +++ b/sysdeps/arm/jmpbuf-unwind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/ldbl-classify-compat.h b/sysdeps/arm/ldbl-classify-compat.h new file mode 100644 index 0000000000..f3f10607ca --- /dev/null +++ b/sysdeps/arm/ldbl-classify-compat.h @@ -0,0 +1,8 @@ +#ifndef ARM_LDBL_CLASSIFY_COMPAT_H +#define ARM_LDBL_CLASSIFY_COMPAT_H 1 + +/* Enable __finitel, __isinfl, and __isnanl for binary compatibility + when built without long double support. */ +#define LDBL_CLASSIFY_COMPAT 1 + +#endif diff --git a/sysdeps/arm/ldsodefs.h b/sysdeps/arm/ldsodefs.h index 1e9e25218e..ce5d625c56 100644 --- a/sysdeps/arm/ldsodefs.h +++ b/sysdeps/arm/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/libc-tls.c b/sysdeps/arm/libc-tls.c index 8422296348..15bc3dad11 100644 --- a/sysdeps/arm/libc-tls.c +++ b/sysdeps/arm/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. ARM version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index aa3d696863..e62cca3e03 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -184,15 +184,15 @@ idouble: 1 ifloat: 2 Function: Imaginary part of "cacos": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Real part of "cacos_downward": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 Function: Imaginary part of "cacos_downward": @@ -202,9 +202,9 @@ idouble: 5 ifloat: 3 Function: Real part of "cacos_towardzero": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 Function: Imaginary part of "cacos_towardzero": @@ -220,15 +220,15 @@ idouble: 2 ifloat: 2 Function: Imaginary part of "cacos_upward": -double: 4 -float: 4 -idouble: 4 -ifloat: 4 +double: 5 +float: 7 +idouble: 5 +ifloat: 7 Function: Real part of "cacosh": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Imaginary part of "cacosh": @@ -244,10 +244,10 @@ idouble: 5 ifloat: 3 Function: Imaginary part of "cacosh_downward": -double: 2 -float: 2 -idouble: 2 -ifloat: 2 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 Function: Real part of "cacosh_towardzero": double: 5 @@ -256,9 +256,9 @@ idouble: 5 ifloat: 3 Function: Imaginary part of "cacosh_towardzero": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 Function: Real part of "cacosh_upward": @@ -268,9 +268,9 @@ idouble: 4 ifloat: 4 Function: Imaginary part of "cacosh_upward": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 Function: "carg": @@ -302,16 +302,16 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "casin": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Real part of "casin_downward": double: 3 -float: 1 +float: 2 idouble: 3 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "casin_downward": double: 5 @@ -332,21 +332,21 @@ idouble: 5 ifloat: 3 Function: Real part of "casin_upward": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 +double: 3 +float: 2 +idouble: 3 +ifloat: 2 Function: Imaginary part of "casin_upward": -double: 4 -float: 4 -idouble: 4 -ifloat: 4 +double: 5 +float: 7 +idouble: 5 +ifloat: 7 Function: Real part of "casinh": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Imaginary part of "casinh": @@ -363,9 +363,9 @@ ifloat: 3 Function: Imaginary part of "casinh_downward": double: 3 -float: 1 +float: 2 idouble: 3 -ifloat: 1 +ifloat: 2 Function: Real part of "casinh_towardzero": double: 5 @@ -380,19 +380,21 @@ idouble: 3 ifloat: 1 Function: Real part of "casinh_upward": -double: 4 -float: 4 -idouble: 4 -ifloat: 4 +double: 5 +float: 7 +idouble: 5 +ifloat: 7 Function: Imaginary part of "casinh_upward": -double: 2 +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 Function: Real part of "catan": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Imaginary part of "catan": @@ -403,9 +405,9 @@ ifloat: 1 Function: Real part of "catan_downward": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "catan_downward": double: 2 @@ -415,18 +417,20 @@ ifloat: 2 Function: Real part of "catan_towardzero": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "catan_towardzero": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Real part of "catan_upward": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Imaginary part of "catan_upward": @@ -442,7 +446,9 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "catanh": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Real part of "catanh_downward": @@ -459,9 +465,9 @@ ifloat: 2 Function: Real part of "catanh_towardzero": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "catanh_towardzero": double: 1 @@ -471,12 +477,14 @@ ifloat: 2 Function: Real part of "catanh_upward": double: 4 -float: 3 +float: 4 idouble: 4 -ifloat: 3 +ifloat: 4 Function: Imaginary part of "catanh_upward": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "cbrt": @@ -671,9 +679,9 @@ ifloat: 2 Function: Real part of "clog10_downward": double: 5 -float: 4 +float: 5 idouble: 5 -ifloat: 4 +ifloat: 5 Function: Imaginary part of "clog10_downward": double: 2 @@ -742,7 +750,9 @@ idouble: 1 ifloat: 2 Function: "cos": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "cos_downward": @@ -789,9 +799,9 @@ ifloat: 2 Function: Real part of "cpow": double: 2 -float: 4 +float: 5 idouble: 2 -ifloat: 4 +ifloat: 5 Function: Imaginary part of "cpow": float: 2 @@ -977,9 +987,9 @@ ifloat: 1 Function: Imaginary part of "ctan": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Real part of "ctan_downward": double: 6 @@ -989,9 +999,9 @@ ifloat: 5 Function: Imaginary part of "ctan_downward": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Real part of "ctan_towardzero": double: 5 @@ -1007,9 +1017,9 @@ ifloat: 2 Function: Real part of "ctan_upward": double: 2 -float: 3 +float: 4 idouble: 2 -ifloat: 3 +ifloat: 4 Function: Imaginary part of "ctan_upward": double: 2 @@ -1019,9 +1029,9 @@ ifloat: 3 Function: Real part of "ctanh": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "ctanh": double: 2 @@ -1031,9 +1041,9 @@ ifloat: 2 Function: Real part of "ctanh_downward": double: 4 -float: 1 +float: 2 idouble: 4 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "ctanh_downward": double: 6 @@ -1165,15 +1175,21 @@ ifloat: 1 Function: "exp_downward": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: "exp_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: "exp_upward": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: "expm1": double: 1 @@ -1247,9 +1263,9 @@ ifloat: 2 Function: "j0_downward": double: 2 -float: 3 +float: 4 idouble: 2 -ifloat: 3 +ifloat: 4 Function: "j0_towardzero": double: 3 @@ -1271,9 +1287,9 @@ ifloat: 2 Function: "j1_downward": double: 3 -float: 2 +float: 3 idouble: 3 -ifloat: 2 +ifloat: 3 Function: "j1_towardzero": double: 3 @@ -1426,29 +1442,9 @@ idouble: 1 ifloat: 2 Function: "pow": +double: 1 float: 1 -ifloat: 1 - -Function: "pow10": -double: 2 -idouble: 2 - -Function: "pow10_downward": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -Function: "pow10_towardzero": -double: 2 -float: 1 -idouble: 2 -ifloat: 1 - -Function: "pow10_upward": -double: 2 -float: 1 -idouble: 2 +idouble: 1 ifloat: 1 Function: "pow_downward": @@ -1470,7 +1466,9 @@ idouble: 1 ifloat: 1 Function: "sin": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "sin_downward": @@ -1492,7 +1490,9 @@ idouble: 1 ifloat: 2 Function: "sincos": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "sincos_downward": @@ -1615,9 +1615,9 @@ ifloat: 1 Function: "y0_downward": double: 3 -float: 2 +float: 4 idouble: 3 -ifloat: 2 +ifloat: 4 Function: "y0_towardzero": double: 3 @@ -1627,9 +1627,9 @@ ifloat: 3 Function: "y0_upward": double: 3 -float: 4 +float: 5 idouble: 3 -ifloat: 4 +ifloat: 5 Function: "y1": double: 3 @@ -1657,15 +1657,15 @@ ifloat: 2 Function: "yn": double: 3 -float: 2 +float: 3 idouble: 3 -ifloat: 2 +ifloat: 3 Function: "yn_downward": double: 3 -float: 2 +float: 4 idouble: 3 -ifloat: 2 +ifloat: 4 Function: "yn_towardzero": double: 3 @@ -1675,8 +1675,8 @@ ifloat: 3 Function: "yn_upward": double: 4 -float: 4 +float: 5 idouble: 4 -ifloat: 4 +ifloat: 5 # end of automatic generation diff --git a/sysdeps/arm/libm-test-ulps-name b/sysdeps/arm/libm-test-ulps-name new file mode 100644 index 0000000000..74f9acfffa --- /dev/null +++ b/sysdeps/arm/libm-test-ulps-name @@ -0,0 +1 @@ +ARM diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h index 48a8ff4744..a288c33bbe 100644 --- a/sysdeps/arm/machine-gmon.h +++ b/sysdeps/arm/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-dependent definitions for profiling support. ARM EABI version. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,9 +24,9 @@ /* We must not pollute the global namespace. */ #define mcount_internal __mcount_internal -extern void mcount_internal (u_long frompc, u_long selfpc) internal_function; +extern void mcount_internal (u_long frompc, u_long selfpc); #define _MCOUNT_DECL(frompc, selfpc) \ - void internal_function mcount_internal (u_long frompc, u_long selfpc) + void mcount_internal (u_long frompc, u_long selfpc) /* Define MCOUNT as empty since we have the implementation in another file. */ diff --git a/sysdeps/arm/math-tests.h b/sysdeps/arm/math-tests.h index a62b82246e..d4d68f39c9 100644 --- a/sysdeps/arm/math-tests.h +++ b/sysdeps/arm/math-tests.h @@ -1,5 +1,5 @@ /* Configuration for math tests. ARM version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/math_private.h b/sysdeps/arm/math_private.h index d39e9ee24a..c175b15601 100644 --- a/sysdeps/arm/math_private.h +++ b/sysdeps/arm/math_private.h @@ -1,10 +1,6 @@ #ifndef ARM_MATH_PRIVATE_H #define ARM_MATH_PRIVATE_H 1 -/* Enable __finitel, __isinfl, and __isnanl for binary compatibility - when built without long double support. */ -#define LDBL_CLASSIFY_COMPAT 1 - #include "fenv_private.h" #include_next <math_private.h> diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S index db8ba50af3..cba8609813 100644 --- a/sysdeps/arm/memcpy.S +++ b/sysdeps/arm/memcpy.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by MontaVista Software, Inc. (written by Nicolas Pitre) @@ -70,7 +70,7 @@ ENTRY(memcpy) subs r2, r2, #4 blt 8f ands ip, r0, #3 - PLD( sfi_pld r1, #0 ) + PLD( pld [r1, #0] ) bne 9f ands ip, r1, #3 bne 10f @@ -97,19 +97,17 @@ ENTRY(memcpy) CALGN( bx r4 ) #endif - PLD( sfi_pld r1, #0 ) + PLD( pld [r1, #0] ) 2: PLD( subs r2, r2, #96 ) - PLD( sfi_pld r1, #28 ) + PLD( pld [r1, #28] ) PLD( blt 4f ) - PLD( sfi_pld r1, #60 ) - PLD( sfi_pld r1, #92 ) + PLD( pld [r1, #60] ) + PLD( pld [r1, #92] ) -3: PLD( sfi_pld r1, #124 ) -4: sfi_breg r1, \ - ldmia \B!, {r3, r4, r5, r6, r7, r8, ip, lr} +3: PLD( pld [r1, #124] ) +4: ldmia r1!, {r3, r4, r5, r6, r7, r8, ip, lr} subs r2, r2, #32 - sfi_breg r0, \ - stmia \B!, {r3, r4, r5, r6, r7, r8, ip, lr} + stmia r0!, {r3, r4, r5, r6, r7, r8, ip, lr} bge 3b PLD( cmn r2, #96 ) PLD( bge 4b ) @@ -136,26 +134,19 @@ ENTRY(memcpy) .p2align ARM_BX_ALIGN_LOG2 6: nop .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r3, [\B], #4 + ldr r3, [r1], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r4, [\B], #4 + ldr r4, [r1], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r5, [\B], #4 + ldr r5, [r1], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r6, [\B], #4 + ldr r6, [r1], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r7, [\B], #4 + ldr r7, [r1], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r8, [\B], #4 + ldr r8, [r1], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr lr, [\B], #4 + ldr lr, [r1], #4 #ifndef ARM_ALWAYS_BX add pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) @@ -172,26 +163,19 @@ ENTRY(memcpy) .p2align ARM_BX_ALIGN_LOG2 66: nop .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r3, [\B], #4 + str r3, [r0], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r4, [\B], #4 + str r4, [r0], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r5, [\B], #4 + str r5, [r0], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r6, [\B], #4 + str r6, [r0], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r7, [\B], #4 + str r7, [r0], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r8, [\B], #4 + str r8, [r0], #4 .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str lr, [\B], #4 + str lr, [r0], #4 #ifdef ARM_ALWAYS_BX pop {r10} @@ -209,18 +193,12 @@ ENTRY(memcpy) cfi_restore (r8) 8: movs r2, r2, lsl #31 - sfi_breg r1, \ - ldrbne r3, [\B], #1 - sfi_breg r1, \ - ldrbcs r4, [\B], #1 - sfi_breg r1, \ - ldrbcs ip, [\B] - sfi_breg r0, \ - strbne r3, [\B], #1 - sfi_breg r0, \ - strbcs r4, [\B], #1 - sfi_breg r0, \ - strbcs ip, [\B] + ldrbne r3, [r1], #1 + ldrbcs r4, [r1], #1 + ldrbcs ip, [r1] + strbne r3, [r0], #1 + strbcs r4, [r0], #1 + strbcs ip, [r0] #if ((defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)) \ || defined (ARM_ALWAYS_BX)) @@ -237,27 +215,20 @@ ENTRY(memcpy) 9: rsb ip, ip, #4 cmp ip, #2 - sfi_breg r1, \ - ldrbgt r3, [\B], #1 - sfi_breg r1, \ - ldrbge r4, [\B], #1 - sfi_breg r1, \ - ldrb lr, [\B], #1 - sfi_breg r0, \ - strbgt r3, [\B], #1 - sfi_breg r0, \ - strbge r4, [\B], #1 + ldrbgt r3, [r1], #1 + ldrbge r4, [r1], #1 + ldrb lr, [r1], #1 + strbgt r3, [r0], #1 + strbge r4, [r0], #1 subs r2, r2, ip - sfi_breg r0, \ - strb lr, [\B], #1 + strb lr, [r0], #1 blt 8b ands ip, r1, #3 beq 1b 10: bic r1, r1, #3 cmp ip, #2 - sfi_breg r1, \ - ldr lr, [\B], #4 + ldr lr, [r1], #4 beq 17f bgt 18f @@ -281,20 +252,18 @@ ENTRY(memcpy) cfi_rel_offset (r8, 12) cfi_rel_offset (r10, 16) - PLD( sfi_pld r1, #0 ) + PLD( pld [r1, #0] ) PLD( subs r2, r2, #96 ) - PLD( sfi_pld r1, #28 ) + PLD( pld [r1, #28] ) PLD( blt 13f ) - PLD( sfi_pld r1, #60 ) - PLD( sfi_pld r1, #92 ) + PLD( pld [r1, #60] ) + PLD( pld [r1, #92] ) -12: PLD( sfi_pld r1, #124 ) -13: sfi_breg r1, \ - ldmia \B!, {r4, r5, r6, r7} +12: PLD( pld [r1, #124] ) +13: ldmia r1!, {r4, r5, r6, r7} mov r3, lr, PULL #\pull subs r2, r2, #32 - sfi_breg r1, \ - ldmia \B!, {r8, r10, ip, lr} + ldmia r1!, {r8, r10, ip, lr} orr r3, r3, r4, PUSH #\push mov r4, r4, PULL #\pull orr r4, r4, r5, PUSH #\push @@ -310,8 +279,7 @@ ENTRY(memcpy) orr r10, r10, ip, PUSH #\push mov ip, ip, PULL #\pull orr ip, ip, lr, PUSH #\push - sfi_breg r0, \ - stmia \B!, {r3, r4, r5, r6, r7, r8, r10, ip} + stmia r0!, {r3, r4, r5, r6, r7, r8, r10, ip} bge 12b PLD( cmn r2, #96 ) PLD( bge 13b ) @@ -328,12 +296,10 @@ ENTRY(memcpy) beq 16f 15: mov r3, lr, PULL #\pull - sfi_breg r1, \ - ldr lr, [\B], #4 + ldr lr, [r1], #4 subs ip, ip, #4 orr r3, r3, lr, PUSH #\push - sfi_breg r0, \ - str r3, [\B], #4 + str r3, [r0], #4 bgt 15b CALGN( cmp r2, #0 ) CALGN( bge 11b ) diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S index 96b2366e92..74d3042043 100644 --- a/sysdeps/arm/memmove.S +++ b/sysdeps/arm/memmove.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2016 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by MontaVista Software, Inc. (written by Nicolas Pitre) @@ -87,7 +87,7 @@ ENTRY(memmove) subs r2, r2, #4 blt 8f ands ip, r0, #3 - PLD( sfi_pld r1, #-4 ) + PLD( pld [r1, #-4] ) bne 9f ands ip, r1, #3 bne 10f @@ -113,19 +113,17 @@ ENTRY(memmove) CALGN( bx r4 ) #endif - PLD( sfi_pld r1, #-4 ) + PLD( pld [r1, #-4] ) 2: PLD( subs r2, r2, #96 ) - PLD( sfi_pld r1, #-32 ) + PLD( pld [r1, #-32] ) PLD( blt 4f ) - PLD( sfi_pld r1, #-64 ) - PLD( sfi_pld r1, #-96 ) + PLD( pld [r1, #-64] ) + PLD( pld [r1, #-96] ) -3: PLD( sfi_pld r1, #-128 ) -4: sfi_breg r1, \ - ldmdb \B!, {r3, r4, r5, r6, r7, r8, ip, lr} +3: PLD( pld [r1, #-128] ) +4: ldmdb r1!, {r3, r4, r5, r6, r7, r8, ip, lr} subs r2, r2, #32 - sfi_breg r0, \ - stmdb \B!, {r3, r4, r5, r6, r7, r8, ip, lr} + stmdb r0!, {r3, r4, r5, r6, r7, r8, ip, lr} bge 3b PLD( cmn r2, #96 ) PLD( bge 4b ) @@ -152,26 +150,19 @@ ENTRY(memmove) .p2align ARM_BX_ALIGN_LOG2 6: nop .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r3, [\B, #-4]! + ldr r3, [r1, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r4, [\B, #-4]! + ldr r4, [r1, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r5, [\B, #-4]! + ldr r5, [r1, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r6, [\B, #-4]! + ldr r6, [r1, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r7, [\B, #-4]! + ldr r7, [r1, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr r8, [\B, #-4]! + ldr r8, [r1, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r1, \ - ldr lr, [\B, #-4]! + ldr lr, [r1, #-4]! #ifndef ARM_ALWAYS_BX add pc, pc, ip, lsl #(ARM_BX_ALIGN_LOG2 - 2) @@ -188,26 +179,19 @@ ENTRY(memmove) .p2align ARM_BX_ALIGN_LOG2 66: nop .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r3, [\B, #-4]! + str r3, [r0, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r4, [\B, #-4]! + str r4, [r0, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r5, [\B, #-4]! + str r5, [r0, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r6, [\B, #-4]! + str r6, [r0, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r7, [\B, #-4]! + str r7, [r0, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str r8, [\B, #-4]! + str r8, [r0, #-4]! .p2align ARM_BX_ALIGN_LOG2 - sfi_breg r0, \ - str lr, [\B, #-4]! + str lr, [r0, #-4]! #ifdef ARM_ALWAYS_BX pop {r10} @@ -225,18 +209,12 @@ ENTRY(memmove) cfi_restore (r8) 8: movs r2, r2, lsl #31 - sfi_breg r1, \ - ldrbne r3, [\B, #-1]! - sfi_breg r1, \ - ldrbcs r4, [\B, #-1]! - sfi_breg r1, \ - ldrbcs ip, [\B, #-1] - sfi_breg r0, \ - strbne r3, [\B, #-1]! - sfi_breg r0, \ - strbcs r4, [\B, #-1]! - sfi_breg r0, \ - strbcs ip, [\B, #-1] + ldrbne r3, [r1, #-1]! + ldrbcs r4, [r1, #-1]! + ldrbcs ip, [r1, #-1] + strbne r3, [r0, #-1]! + strbcs r4, [r0, #-1]! + strbcs ip, [r0, #-1] #if ((defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)) \ || defined (ARM_ALWAYS_BX)) @@ -252,27 +230,20 @@ ENTRY(memmove) cfi_restore_state 9: cmp ip, #2 - sfi_breg r1, \ - ldrbgt r3, [\B, #-1]! - sfi_breg r1, \ - ldrbge r4, [\B, #-1]! - sfi_breg r1, \ - ldrb lr, [\B, #-1]! - sfi_breg r0, \ - strbgt r3, [\B, #-1]! - sfi_breg r0, \ - strbge r4, [\B, #-1]! + ldrbgt r3, [r1, #-1]! + ldrbge r4, [r1, #-1]! + ldrb lr, [r1, #-1]! + strbgt r3, [r0, #-1]! + strbge r4, [r0, #-1]! subs r2, r2, ip - sfi_breg r0, \ - strb lr, [\B, #-1]! + strb lr, [r0, #-1]! blt 8b ands ip, r1, #3 beq 1b 10: bic r1, r1, #3 cmp ip, #2 - sfi_breg r1, \ - ldr r3, [\B, #0] + ldr r3, [r1, #0] beq 17f blt 18f @@ -296,20 +267,18 @@ ENTRY(memmove) cfi_rel_offset (r8, 12) cfi_rel_offset (r10, 16) - PLD( sfi_pld r1, #-4 ) + PLD( pld [r1, #-4] ) PLD( subs r2, r2, #96 ) - PLD( sfi_pld r1, #-32 ) + PLD( pld [r1, #-32] ) PLD( blt 13f ) - PLD( sfi_pld r1, #-64 ) - PLD( sfi_pld r1, #-96 ) + PLD( pld [r1, #-64] ) + PLD( pld [r1, #-96] ) -12: PLD( sfi_pld r1, #-128 ) -13: sfi_breg r1, \ - ldmdb \B!, {r7, r8, r10, ip} +12: PLD( pld [r1, #-128] ) +13: ldmdb r1!, {r7, r8, r10, ip} mov lr, r3, PUSH #\push subs r2, r2, #32 - sfi_breg r1, \ - ldmdb \B!, {r3, r4, r5, r6} + ldmdb r1!, {r3, r4, r5, r6} orr lr, lr, ip, PULL #\pull mov ip, ip, PUSH #\push orr ip, ip, r10, PULL #\pull @@ -325,8 +294,7 @@ ENTRY(memmove) orr r5, r5, r4, PULL #\pull mov r4, r4, PUSH #\push orr r4, r4, r3, PULL #\pull - sfi_breg r0, \ - stmdb \B!, {r4 - r8, r10, ip, lr} + stmdb r0!, {r4 - r8, r10, ip, lr} bge 12b PLD( cmn r2, #96 ) PLD( bge 13b ) @@ -343,12 +311,10 @@ ENTRY(memmove) beq 16f 15: mov lr, r3, PUSH #\push - sfi_breg r1, \ - ldr r3, [\B, #-4]! + ldr r3, [r1, #-4]! subs ip, ip, #4 orr lr, lr, r3, PULL #\pull - sfi_breg r0, \ - str lr, [\B, #-4]! + str lr, [r0, #-4]! bgt 15b CALGN( cmp r2, #0 ) CALGN( bge 11b ) diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S index c11857f55c..6ab173cca0 100644 --- a/sysdeps/arm/memset.S +++ b/sysdeps/arm/memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2016 Free Software Foundation, Inc. +/* Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell <philb@gnu.org> @@ -32,8 +32,7 @@ ENTRY(memset) 1: tst r3, #3 @ aligned yet? - sfi_breg r3, \ - strbne r1, [\B], #1 + strbne r1, [r3], #1 subne r2, r2, #1 bne 1b @@ -44,33 +43,25 @@ ENTRY(memset) 1: subs r2, r2, #8 - sfi_breg r3, \ - stmiacs \B!, {r1, ip} @ store up to 32 bytes per loop iteration + stmiacs r3!, {r1, ip} @ store up to 32 bytes per loop iteration subscs r2, r2, #8 - sfi_breg r3, \ - stmiacs \B!, {r1, ip} + stmiacs r3!, {r1, ip} subscs r2, r2, #8 - sfi_breg r3, \ - stmiacs \B!, {r1, ip} + stmiacs r3!, {r1, ip} subscs r2, r2, #8 - sfi_breg r3, \ - stmiacs \B!, {r1, ip} + stmiacs r3!, {r1, ip} bcs 1b and r2, r2, #7 2: subs r2, r2, #1 @ store up to 4 bytes per loop iteration - sfi_breg r3, \ - strbcs r1, [\B], #1 + strbcs r1, [r3], #1 subscs r2, r2, #1 - sfi_breg r3, \ - strbcs r1, [\B], #1 + strbcs r1, [r3], #1 subscs r2, r2, #1 - sfi_breg r3, \ - strbcs r1, [\B], #1 + strbcs r1, [r3], #1 subscs r2, r2, #1 - sfi_breg r3, \ - strbcs r1, [\B], #1 + strbcs r1, [r3], #1 bcs 2b DO_RET(lr) diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h index 592a751618..5222d33d5c 100644 --- a/sysdeps/arm/memusage.h +++ b/sysdeps/arm/memusage.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/nacl/Implies b/sysdeps/arm/nacl/Implies deleted file mode 100644 index 2294208dba..0000000000 --- a/sysdeps/arm/nacl/Implies +++ /dev/null @@ -1,2 +0,0 @@ -arm/nptl -init_array diff --git a/sysdeps/arm/nacl/Makefile b/sysdeps/arm/nacl/Makefile deleted file mode 100644 index ccec4a7442..0000000000 --- a/sysdeps/arm/nacl/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Makefile fragment for ARM/NaCl configurations. - -# Copyright (C) 2015-2016 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# The GNU C Library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. - -# The GNU C Library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. - -# You should have received a copy of the GNU Lesser General Public -# License along with the GNU C Library; if not, see -# <http://www.gnu.org/licenses/>. - -# sysdeps/nacl/Makefile needs this set to the architecture suffix used in -# the NaCl SDK. -nacl-sdk-arch = arm - -# We don't really support TLSDESC, even though the compiler thinks it does. -have-arm-tls-desc = no - -ifeq ($(subdir),csu) -sysdep_routines += aeabi_read_tp -endif - -ifeq ($(subdir),elf) -sysdep-rtld-routines += aeabi_read_tp -endif diff --git a/sysdeps/arm/nacl/____longjmp_chk.S b/sysdeps/arm/nacl/____longjmp_chk.S deleted file mode 100644 index afc8ee6468..0000000000 --- a/sysdeps/arm/nacl/____longjmp_chk.S +++ /dev/null @@ -1,47 +0,0 @@ -/* longjmp that validates stack addresses. ARM/NaCl version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - .section .rodata.str1.1,"aMS",%progbits,1 - .type longjmp_msg,%object -longjmp_msg: - .string "longjmp causes uninitialized stack frame" - .size longjmp_msg, .-longjmp_msg - - .text - -/* We don't have sigaltstack and so any longjmp must be to an outer frame. */ -.macro check_sp reg - cmp sp, \reg - bls .Lok -#ifdef PIC - movw r0, #:lower16:longjmp_msg-(.LPIC0+8) - movt r0, #:upper16:longjmp_msg-(.LPIC0+8) -.LPIC0: add r0, r0, pc -#else - movw r0, #:lower16:longjmp_msg - movt r0, #:upper16:longjmp_msg -#endif - b HIDDEN_JUMPTARGET(__fortify_fail) -.Lok: -.endm - -#define CHECK_SP(reg) check_sp reg -#define __longjmp ____longjmp_chk -#include <__longjmp.S> diff --git a/sysdeps/arm/nacl/aeabi_read_tp.S b/sysdeps/arm/nacl/aeabi_read_tp.S deleted file mode 100644 index 03186858d3..0000000000 --- a/sysdeps/arm/nacl/aeabi_read_tp.S +++ /dev/null @@ -1,44 +0,0 @@ -/* ARM EABI helper function for reading the thread pointer. NaCl version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - 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 <sysdep.h> - -/* GCC will emit calls to this routine under -mtp=soft. */ - - .hidden __aeabi_read_tp -ENTRY (__aeabi_read_tp) - ldr r0, [r9] - sfi_bx lr -END (__aeabi_read_tp) diff --git a/sysdeps/arm/nacl/arm-features.h b/sysdeps/arm/nacl/arm-features.h deleted file mode 100644 index 4ebe1b4b4c..0000000000 --- a/sysdeps/arm/nacl/arm-features.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Macros to test for CPU features on ARM. NaCl version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _NACL_ARM_FEATURES_H -#define _NACL_ARM_FEATURES_H 1 - -#ifdef __SOFTFP__ -# error NaCl should always have VFP enabled -#endif - -/* NaCl does not support iWMMXt at all. */ -#define ARM_ASSUME_NO_IWMMXT 1 - -/* NaCl does not allow instructions to target the pc register. */ -#define ARM_ALWAYS_BX 1 - -/* Computed branch targets must be bundle-aligned, which is to 16 bytes. */ -#define ARM_BX_ALIGN_LOG2 4 - -/* Two-register addressing modes are never allowed. */ -#define ARM_NO_INDEX_REGISTER 1 - -/* Only ARM mode code is allowed, never Thumb mode. */ -#define NO_THUMB - -#include_next <arm-features.h> - -#endif /* arm-features.h */ diff --git a/sysdeps/arm/nacl/dl-machine.h b/sysdeps/arm/nacl/dl-machine.h deleted file mode 100644 index 530d2352dd..0000000000 --- a/sysdeps/arm/nacl/dl-machine.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Machine-dependent ELF dynamic relocation inline functions. ARM/NaCl version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef dl_machine_h - -/* This is only needed for handling TEXTRELs and NaCl will never - support TEXTRELs at all. */ -#define CLEAR_CACHE(start, end) __builtin_trap () - -#endif - -/* The rest is just machine-specific. - This #include is outside the #ifndef because the parts of - dl-machine.h used only by dynamic-link.h are outside the guard. */ -#include <sysdeps/arm/dl-machine.h> - -#ifdef dl_machine_h - -/* Initial entry point code for the dynamic linker. - The C function `_dl_start' is the real entry point; - its return value is the user program's entry point. */ -#undef RTLD_START -#define RTLD_START asm ("\ -.text\n\ -.globl _start\n\ -.type _start, %function\n\ -.p2align 4\n\ -_start:\n\ - @ r0 has the pointer to the info block (see nacl_startup.h)\n\ - mov r1, sp @ Save stack base for __libc_stack_end.\n\ - push {r0-r3} @ Push those, maintaining alignment to 16.\n\ - mov r0, sp @ Pointer to {info, sp} is argument.\n\ - sfi_bl _dl_start\n\ - pop {r1-r4} @ Restore stack, getting info block into r1.\n\ - mov lr, #0 @ Return address for noreturn call.\n\ - b _dl_start_user"); - -#endif diff --git a/sysdeps/arm/nacl/dl-trampoline.S b/sysdeps/arm/nacl/dl-trampoline.S deleted file mode 100644 index 147bd43e78..0000000000 --- a/sysdeps/arm/nacl/dl-trampoline.S +++ /dev/null @@ -1,278 +0,0 @@ -/* PLT trampolines. ARM/NaCl version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - - .syntax unified - .text - -@ Change &GOT[n+3] into 8*n. Note relocs are 8 bytes each. -.macro compute_reloc_arg pltgot, got2 - sub r1, \pltgot, \got2 @ r1 = &GOT[n+3] - &GOT[2] = 4*(n-1) - sub r1, r1, #4 @ r1 = 4*n - add r1, r1, r1 @ r1 *= 2 = 8*n -.endm - - CFI_SECTIONS - .globl _dl_runtime_resolve - .type _dl_runtime_resolve, %function - .p2align 4 -_dl_runtime_resolve: - cfi_startproc - cfi_adjust_cfa_offset (8) - - @ We get called with: - @ lr contains the return address from this call - @ stack[1] contains &GOT[n+3] (pointer to function) - @ stack[0] points to &GOT[2] - - ldr ip, [sp] @ ip gets &GOT[2] - - @ Save the argument registers and the return address. - @ r4 doesn't need to be saved, but it makes the total - @ adjustment to sp (including the two words pushed by - @ the PLT code) an even eight words, so sp stays aligned. - push {r0-r4, lr} - cfi_adjust_cfa_offset (24) - cfi_rel_offset (r0, 0) - cfi_rel_offset (r1, 4) - cfi_rel_offset (r2, 8) - cfi_rel_offset (r3, 12) - cfi_rel_offset (r4, 16) - cfi_rel_offset (lr, 20) - - ldr r1, [sp, #28] @ r1 gets &GOT[n+3] - - @ Get the 'struct link_map *' for the first argument to _dl_fixup. - sfi_breg ip, ldr r0, [\B, #-4] - - @ Get the reloc offset for the second argument to _dl_fixup. - compute_reloc_arg r1, ip - - @ This does the real work, and returns the real call target. - sfi_bl _dl_fixup - mov ip, r0 - - @ Restore the saved registers. - pop {r0-r4, lr} - cfi_adjust_cfa_offset (-24) - cfi_restore (r0) - cfi_restore (r1) - cfi_restore (r2) - cfi_restore (r3) - cfi_restore (r4) - cfi_restore (lr) - - @ Now compensate for the two words pushed by the PLT code. - sfi_sp add sp, #8 - cfi_adjust_cfa_offset (-8) - - @ Finally, jump to the newfound call target. - sfi_bx ip - - cfi_endproc - .size _dl_runtime_resolve, .-_dl_runtime_resolve - -#ifndef PROF - .globl _dl_runtime_profile - .type _dl_runtime_profile, #function - .p2align 4 -_dl_runtime_profile: - cfi_startproc - cfi_adjust_cfa_offset (8) - - @ We get called with: - @ lr contains the return address from this call - @ stack[1] contains &GOT[n+3] (pointer to function) - @ stack[0] points to &GOT[2] - - @ Stack layout: - @ sp + 204 framesize returned from pltenter - @ sp + 12 La_arm_regs - @ sp + 4 Saved two arguments to _dl_profile_fixup - @ sp + 0 outgoing argument to _dl_profile_fixup - @ For now, we only save the general purpose registers. -# define PLTEXIT_ARGS 4 -# define LA_ARM_REGS (PLTEXIT_ARGS + 8) -# define LA_ARM_REGS_SIZE (4 * (4 + 1 + 1 + 42)) -# define PLTENTER_FRAMESIZE (LA_ARM_REGS + LA_ARM_REGS_SIZE) -# define FRAMESIZE (((PLTENTER_FRAMESIZE + 4) + 15) & -16) - - @ The NaCl ABI requires that sp be aligned to 16 bytes at call - @ sites. Assuming that was met on entry to the PLT, sp is - @ now exactly 8 bytes misaligned. - sfi_sp sub sp, #(FRAMESIZE - 8) - cfi_def_cfa_offset (FRAMESIZE) - - @ Store the argument registers in La_arm_regs. - strd r0, r1, [sp, #LA_ARM_REGS] - cfi_offset (r0, LA_ARM_REGS + 0) - cfi_offset (r1, LA_ARM_REGS + 4) - strd r2, r3, [sp, #(LA_ARM_REGS + 8)] - cfi_offset (r2, LA_ARM_REGS + 8) - cfi_offset (r3, LA_ARM_REGS + 12) - - ldr ip, [sp, #(FRAMESIZE - 8)] @ ip gets &GOT[2] - ldr r3, [sp, #(FRAMESIZE - 4)] @ r3 gets &GOT[n+3] - - @ Recover the incoming sp and lr and save those in La_arm_regs. - add r0, sp, #FRAMESIZE - mov r1, lr - strd r0, r1, [sp, #(LA_ARM_REGS + 16)] - cfi_offset (sp, LA_ARM_REGS + 16) - cfi_offset (lr, LA_ARM_REGS + 20) - - @ Get the 'struct link_map *' for the first arg to _dl_profile_fixup. - sfi_breg ip, ldr r0, [\B, #-4] - - @ Get the reloc offset for the second argument to _dl_profile_fixup. - compute_reloc_arg r3, ip - - @ The third argument is the original return address, still in lr. - mov r2, lr - - @ Compute the fourth argument, the La_arm_regs pointer. - add r3, sp, #PLTEXIT_ARGS - - @ Compute the fifth argument, the address of the 'framesize' - @ out parameter, and store it at the top of the stack. - add ip, sp, #PLTENTER_FRAMESIZE - str ip, [sp] - - @ Save away the first two arguments, which we will need - @ again for _dl_call_pltexit, below. - strd r0, r1, [sp, #PLTEXIT_ARGS] - - @ This does the real work, and returns the real call target. - sfi_bl _dl_profile_fixup - - @ The address to call is now in r0. - - @ Check whether we're wrapping this function, - @ i.e. if the framesize out parameter is >= 0. - ldr ip, [sp, #PLTENTER_FRAMESIZE] - cmp ip, #0 - bge 1f - cfi_remember_state - - @ Save _dl_profile_fixup's return value: the real call target. - mov ip, r0 - - @ Restore the registers from the La_arm_regs (perhaps as modified - @ by audit modules' pltenter functions). - add r1, sp, #LA_ARM_REGS - sfi_sp sfi_breg r1, ldmia \B, {r0-r3, sp, lr} - cfi_def_cfa_offset (0) - cfi_restore (r0) - cfi_restore (r1) - cfi_restore (r2) - cfi_restore (r3) - cfi_restore (sp) - cfi_restore (lr) - - @ Finally, jump to the newfound call target. - sfi_bx ip - -1: cfi_restore_state - @ The new frame size is in ip. - - @ Save the fp in the stack slot previously used for the fifth - @ argument to _dl_profile_fixup. - str fp, [sp] - cfi_offset (fp, 0) - - @ Save the result of _dl_profile_fixup, the real call target. - @ We'll reuse the stack slot just used for the 'framesize' - @ out parameter to _dl_profile_fixup. - str r0, [sp, #PLTENTER_FRAMESIZE] - - @ Stack layout: - @ fp + 264 call target - @ fp + 72 La_arm_regs - @ fp + 68 Saved two arguments to _dl_profile_fixup - @ fp + 64 saved fp - @ fp + 0 La_arm_retval - @ sp..fp copied incoming stack space (plus alignment) - @ For now, we only save the general purpose registers. -# define FP_LA_ARM_RETVAL 0 -# define LA_ARM_RETVAL_SIZE (4 * (4 + 12)) -# define FP_SAVED_FP LA_ARM_RETVAL_SIZE -# define FP_PLTEXIT_ARGS (FP_SAVED_FP + 4) -# define FP_LA_ARM_REGS (FP_PLTEXIT_ARGS + 8) -# define FP_CALL_TARGET (FP_LA_ARM_REGS + LA_ARM_REGS_SIZE) -# define FP_FRAMESIZE (FP_CALL_TARGET + 4) - - sub fp, sp, #(FP_FRAMESIZE - FRAMESIZE) - cfi_def_cfa (fp, FP_FRAMESIZE) - - sub r1, fp, ip - @ This doesn't need sfi_sp because we just include the - @ sandboxing mask along with the alignment mask. - bic sp, r1, #0xc000000f - - @ Copy the stack arguments. The audit modules' pltenter - @ function(s) decided how much needs to be copied. - @ Load the sp as modified by pltenter functions, rather - @ than what we think the incoming sp was (fp + FP_FRAMESIZE). - sfi_breg fp, ldr r1, [\B, #(FP_LA_ARM_REGS + 16)] - mov r0, sp - mov r2, ip - sfi_bl memcpy - - @ Load up the arguments from La_arm_regs and call the user's function. - sfi_breg fp, ldr ip, [\B, #FP_CALL_TARGET] - sfi_breg fp, ldrd r0, r1, [\B, #FP_LA_ARM_REGS] - sfi_breg fp, ldrd r2, r3, [\B, #(FP_LA_ARM_REGS + 8)] - sfi_blx ip - - @ Stash the return value registers in La_arm_retval. - sfi_breg fp, strd r0, r1, [\B, #FP_LA_ARM_RETVAL] - sfi_breg fp, strd r2, r3, [\B, #(FP_LA_ARM_RETVAL + 8)] - - @ Call pltexit. We saved the first two arguments earlier--they - @ are the same ones passed to _dl_profile_fixup. The latter two - @ arguments are La_arm_regs and La_arm_retval blocks, respectively. - sfi_breg fp, ldrd r0, r1, [\B, #FP_PLTEXIT_ARGS] - add r2, fp, #FP_LA_ARM_REGS - add r3, fp, #FP_LA_ARM_RETVAL - sfi_bl _dl_call_pltexit - - @ Reload the saved return value registers for the caller. - sfi_breg fp, ldrd r0, r1, [\B, #FP_LA_ARM_RETVAL] - sfi_breg fp, ldrd r2, r3, [\B, #(FP_LA_ARM_RETVAL + 8)] - - @ Unwind the frame. - sfi_sp mov sp, fp - cfi_def_cfa_register (sp) - ldr fp, [sp, #FP_SAVED_FP] - cfi_restore (fp) - @ Reload the lr and sp values from La_arm_regs, where they - @ might have been modified by pltenter functions, rather than - @ computing what we think the incoming value was. - ldr lr, [sp, #(FP_LA_ARM_REGS + 20)] - cfi_restore (lr) - sfi_sp ldr sp, [sp, #(FP_LA_ARM_REGS + 16)] - cfi_def_cfa_offset (0) - - @ Finally, return to the caller. - sfi_bx lr - - cfi_endproc - .size _dl_runtime_profile, .-_dl_runtime_profile -#endif - .previous diff --git a/sysdeps/arm/nacl/include/bits/setjmp.h b/sysdeps/arm/nacl/include/bits/setjmp.h deleted file mode 100644 index 6b6a235871..0000000000 --- a/sysdeps/arm/nacl/include/bits/setjmp.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Private jmp_buf-related definitions. NaCl/ARM version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _INCLUDE_BITS_SETJMP_H -#define _INCLUDE_BITS_SETJMP_H 1 - -#ifndef __ASSEMBLER__ -/* Get the public declarations. */ -# include <sysdeps/arm/bits/setjmp.h> -#endif - -/* Register list for a ldm/stm instruction to load/store - the general registers from a __jmp_buf. - - The generic ARM definition includes r9 (v6), which is not - permitted under NaCl. We add r3 even though it's call-clobbered, - just to keep the size the same as the generic version. */ -#define JMP_BUF_REGLIST {r3, v1-v5, sl, fp} - -/* Index of __jmp_buf where the sp register resides. */ -#define __JMP_BUF_SP 0 - -#endif /* include/bits/setjmp.h */ diff --git a/sysdeps/arm/nacl/libc.abilist b/sysdeps/arm/nacl/libc.abilist deleted file mode 100644 index 561441e548..0000000000 --- a/sysdeps/arm/nacl/libc.abilist +++ /dev/null @@ -1,1836 +0,0 @@ -GLIBC_2.22 GLIBC_2.22 A -GLIBC_2.22 _Exit F -GLIBC_2.22 _IO_2_1_stderr_ D 0xa0 -GLIBC_2.22 _IO_2_1_stdin_ D 0xa0 -GLIBC_2.22 _IO_2_1_stdout_ D 0xa0 -GLIBC_2.22 _IO_adjust_column F -GLIBC_2.22 _IO_adjust_wcolumn F -GLIBC_2.22 _IO_default_doallocate F -GLIBC_2.22 _IO_default_finish F -GLIBC_2.22 _IO_default_pbackfail F -GLIBC_2.22 _IO_default_uflow F -GLIBC_2.22 _IO_default_xsgetn F -GLIBC_2.22 _IO_default_xsputn F -GLIBC_2.22 _IO_do_write F -GLIBC_2.22 _IO_doallocbuf F -GLIBC_2.22 _IO_fclose F -GLIBC_2.22 _IO_fdopen F -GLIBC_2.22 _IO_feof F -GLIBC_2.22 _IO_ferror F -GLIBC_2.22 _IO_fflush F -GLIBC_2.22 _IO_fgetpos F -GLIBC_2.22 _IO_fgetpos64 F -GLIBC_2.22 _IO_fgets F -GLIBC_2.22 _IO_file_attach F -GLIBC_2.22 _IO_file_close F -GLIBC_2.22 _IO_file_close_it F -GLIBC_2.22 _IO_file_doallocate F -GLIBC_2.22 _IO_file_finish F -GLIBC_2.22 _IO_file_fopen F -GLIBC_2.22 _IO_file_init F -GLIBC_2.22 _IO_file_jumps D 0x54 -GLIBC_2.22 _IO_file_open F -GLIBC_2.22 _IO_file_overflow F -GLIBC_2.22 _IO_file_read F -GLIBC_2.22 _IO_file_seek F -GLIBC_2.22 _IO_file_seekoff F -GLIBC_2.22 _IO_file_setbuf F -GLIBC_2.22 _IO_file_stat F -GLIBC_2.22 _IO_file_sync F -GLIBC_2.22 _IO_file_underflow F -GLIBC_2.22 _IO_file_write F -GLIBC_2.22 _IO_file_xsputn F -GLIBC_2.22 _IO_flockfile F -GLIBC_2.22 _IO_flush_all F -GLIBC_2.22 _IO_flush_all_linebuffered F -GLIBC_2.22 _IO_fopen F -GLIBC_2.22 _IO_fprintf F -GLIBC_2.22 _IO_fputs F -GLIBC_2.22 _IO_fread F -GLIBC_2.22 _IO_free_backup_area F -GLIBC_2.22 _IO_free_wbackup_area F -GLIBC_2.22 _IO_fsetpos F -GLIBC_2.22 _IO_fsetpos64 F -GLIBC_2.22 _IO_ftell F -GLIBC_2.22 _IO_ftrylockfile F -GLIBC_2.22 _IO_funlockfile F -GLIBC_2.22 _IO_fwrite F -GLIBC_2.22 _IO_getc F -GLIBC_2.22 _IO_getline F -GLIBC_2.22 _IO_getline_info F -GLIBC_2.22 _IO_gets F -GLIBC_2.22 _IO_init F -GLIBC_2.22 _IO_init_marker F -GLIBC_2.22 _IO_init_wmarker F -GLIBC_2.22 _IO_iter_begin F -GLIBC_2.22 _IO_iter_end F -GLIBC_2.22 _IO_iter_file F -GLIBC_2.22 _IO_iter_next F -GLIBC_2.22 _IO_least_wmarker F -GLIBC_2.22 _IO_link_in F -GLIBC_2.22 _IO_list_all D 0x4 -GLIBC_2.22 _IO_list_lock F -GLIBC_2.22 _IO_list_resetlock F -GLIBC_2.22 _IO_list_unlock F -GLIBC_2.22 _IO_marker_delta F -GLIBC_2.22 _IO_marker_difference F -GLIBC_2.22 _IO_padn F -GLIBC_2.22 _IO_peekc_locked F -GLIBC_2.22 _IO_popen F -GLIBC_2.22 _IO_printf F -GLIBC_2.22 _IO_proc_close F -GLIBC_2.22 _IO_proc_open F -GLIBC_2.22 _IO_putc F -GLIBC_2.22 _IO_puts F -GLIBC_2.22 _IO_remove_marker F -GLIBC_2.22 _IO_seekmark F -GLIBC_2.22 _IO_seekoff F -GLIBC_2.22 _IO_seekpos F -GLIBC_2.22 _IO_seekwmark F -GLIBC_2.22 _IO_setb F -GLIBC_2.22 _IO_setbuffer F -GLIBC_2.22 _IO_setvbuf F -GLIBC_2.22 _IO_sgetn F -GLIBC_2.22 _IO_sprintf F -GLIBC_2.22 _IO_sputbackc F -GLIBC_2.22 _IO_sputbackwc F -GLIBC_2.22 _IO_sscanf F -GLIBC_2.22 _IO_str_init_readonly F -GLIBC_2.22 _IO_str_init_static F -GLIBC_2.22 _IO_str_overflow F -GLIBC_2.22 _IO_str_pbackfail F -GLIBC_2.22 _IO_str_seekoff F -GLIBC_2.22 _IO_str_underflow F -GLIBC_2.22 _IO_sungetc F -GLIBC_2.22 _IO_sungetwc F -GLIBC_2.22 _IO_switch_to_get_mode F -GLIBC_2.22 _IO_switch_to_main_wget_area F -GLIBC_2.22 _IO_switch_to_wbackup_area F -GLIBC_2.22 _IO_switch_to_wget_mode F -GLIBC_2.22 _IO_un_link F -GLIBC_2.22 _IO_ungetc F -GLIBC_2.22 _IO_unsave_markers F -GLIBC_2.22 _IO_unsave_wmarkers F -GLIBC_2.22 _IO_vfprintf F -GLIBC_2.22 _IO_vfscanf F -GLIBC_2.22 _IO_vsprintf F -GLIBC_2.22 _IO_wdefault_doallocate F -GLIBC_2.22 _IO_wdefault_finish F -GLIBC_2.22 _IO_wdefault_pbackfail F -GLIBC_2.22 _IO_wdefault_uflow F -GLIBC_2.22 _IO_wdefault_xsgetn F -GLIBC_2.22 _IO_wdefault_xsputn F -GLIBC_2.22 _IO_wdo_write F -GLIBC_2.22 _IO_wdoallocbuf F -GLIBC_2.22 _IO_wfile_jumps D 0x54 -GLIBC_2.22 _IO_wfile_overflow F -GLIBC_2.22 _IO_wfile_seekoff F -GLIBC_2.22 _IO_wfile_sync F -GLIBC_2.22 _IO_wfile_underflow F -GLIBC_2.22 _IO_wfile_xsputn F -GLIBC_2.22 _IO_wmarker_delta F -GLIBC_2.22 _IO_wsetb F -GLIBC_2.22 __aeabi_MB_CUR_MAX F -GLIBC_2.22 __aeabi_assert F -GLIBC_2.22 __aeabi_atexit F -GLIBC_2.22 __aeabi_errno_addr F -GLIBC_2.22 __aeabi_localeconv F -GLIBC_2.22 __aeabi_memclr F -GLIBC_2.22 __aeabi_memclr4 F -GLIBC_2.22 __aeabi_memclr8 F -GLIBC_2.22 __aeabi_memcpy F -GLIBC_2.22 __aeabi_memcpy4 F -GLIBC_2.22 __aeabi_memcpy8 F -GLIBC_2.22 __aeabi_memmove F -GLIBC_2.22 __aeabi_memmove4 F -GLIBC_2.22 __aeabi_memmove8 F -GLIBC_2.22 __aeabi_memset F -GLIBC_2.22 __aeabi_memset4 F -GLIBC_2.22 __aeabi_memset8 F -GLIBC_2.22 __after_morecore_hook D 0x4 -GLIBC_2.22 __argz_count F -GLIBC_2.22 __argz_next F -GLIBC_2.22 __argz_stringify F -GLIBC_2.22 __asprintf F -GLIBC_2.22 __asprintf_chk F -GLIBC_2.22 __assert F -GLIBC_2.22 __assert_fail F -GLIBC_2.22 __assert_perror_fail F -GLIBC_2.22 __backtrace F -GLIBC_2.22 __backtrace_symbols F -GLIBC_2.22 __backtrace_symbols_fd F -GLIBC_2.22 __bsd_getpgrp F -GLIBC_2.22 __bzero F -GLIBC_2.22 __check_rhosts_file D 0x4 -GLIBC_2.22 __chk_fail F -GLIBC_2.22 __close F -GLIBC_2.22 __confstr_chk F -GLIBC_2.22 __connect F -GLIBC_2.22 __ctype_b_loc F -GLIBC_2.22 __ctype_get_mb_cur_max F -GLIBC_2.22 __ctype_tolower_loc F -GLIBC_2.22 __ctype_toupper_loc F -GLIBC_2.22 __curbrk D 0x4 -GLIBC_2.22 __cxa_at_quick_exit F -GLIBC_2.22 __cxa_atexit F -GLIBC_2.22 __cxa_finalize F -GLIBC_2.22 __cxa_thread_atexit_impl F -GLIBC_2.22 __cyg_profile_func_enter F -GLIBC_2.22 __cyg_profile_func_exit F -GLIBC_2.22 __daylight D 0x4 -GLIBC_2.22 __dcgettext F -GLIBC_2.22 __default_morecore F -GLIBC_2.22 __dgettext F -GLIBC_2.22 __dprintf_chk F -GLIBC_2.22 __dup2 F -GLIBC_2.22 __duplocale F -GLIBC_2.22 __environ D 0x4 -GLIBC_2.22 __fbufsize F -GLIBC_2.22 __fcntl F -GLIBC_2.22 __fdelt_chk F -GLIBC_2.22 __fdelt_warn F -GLIBC_2.22 __ffs F -GLIBC_2.22 __fgets_chk F -GLIBC_2.22 __fgets_unlocked_chk F -GLIBC_2.22 __fgetws_chk F -GLIBC_2.22 __fgetws_unlocked_chk F -GLIBC_2.22 __finite F -GLIBC_2.22 __finitef F -GLIBC_2.22 __finitel F -GLIBC_2.22 __flbf F -GLIBC_2.22 __fork F -GLIBC_2.22 __fpending F -GLIBC_2.22 __fprintf_chk F -GLIBC_2.22 __fpu_control D 0x4 -GLIBC_2.22 __fpurge F -GLIBC_2.22 __fread_chk F -GLIBC_2.22 __fread_unlocked_chk F -GLIBC_2.22 __freadable F -GLIBC_2.22 __freading F -GLIBC_2.22 __free_hook D 0x4 -GLIBC_2.22 __freelocale F -GLIBC_2.22 __fsetlocking F -GLIBC_2.22 __fwprintf_chk F -GLIBC_2.22 __fwritable F -GLIBC_2.22 __fwriting F -GLIBC_2.22 __fxstat F -GLIBC_2.22 __fxstat64 F -GLIBC_2.22 __fxstatat F -GLIBC_2.22 __fxstatat64 F -GLIBC_2.22 __getauxval F -GLIBC_2.22 __getcwd_chk F -GLIBC_2.22 __getdelim F -GLIBC_2.22 __getdomainname_chk F -GLIBC_2.22 __getgroups_chk F -GLIBC_2.22 __gethostname_chk F -GLIBC_2.22 __getlogin_r_chk F -GLIBC_2.22 __getpagesize F -GLIBC_2.22 __getpgid F -GLIBC_2.22 __getpid F -GLIBC_2.22 __gets_chk F -GLIBC_2.22 __gettimeofday F -GLIBC_2.22 __getwd_chk F -GLIBC_2.22 __gmtime_r F -GLIBC_2.22 __gnu_Unwind_Find_exidx F -GLIBC_2.22 __gnu_mcount_nc F -GLIBC_2.22 __h_errno_location F -GLIBC_2.22 __isalnum_l F -GLIBC_2.22 __isalpha_l F -GLIBC_2.22 __isascii_l F -GLIBC_2.22 __isblank_l F -GLIBC_2.22 __iscntrl_l F -GLIBC_2.22 __isctype F -GLIBC_2.22 __isdigit_l F -GLIBC_2.22 __isgraph_l F -GLIBC_2.22 __isinf F -GLIBC_2.22 __isinff F -GLIBC_2.22 __isinfl F -GLIBC_2.22 __islower_l F -GLIBC_2.22 __isnan F -GLIBC_2.22 __isnanf F -GLIBC_2.22 __isnanl F -GLIBC_2.22 __isoc99_fscanf F -GLIBC_2.22 __isoc99_fwscanf F -GLIBC_2.22 __isoc99_scanf F -GLIBC_2.22 __isoc99_sscanf F -GLIBC_2.22 __isoc99_swscanf F -GLIBC_2.22 __isoc99_vfscanf F -GLIBC_2.22 __isoc99_vfwscanf F -GLIBC_2.22 __isoc99_vscanf F -GLIBC_2.22 __isoc99_vsscanf F -GLIBC_2.22 __isoc99_vswscanf F -GLIBC_2.22 __isoc99_vwscanf F -GLIBC_2.22 __isoc99_wscanf F -GLIBC_2.22 __isprint_l F -GLIBC_2.22 __ispunct_l F -GLIBC_2.22 __isspace_l F -GLIBC_2.22 __isupper_l F -GLIBC_2.22 __iswalnum_l F -GLIBC_2.22 __iswalpha_l F -GLIBC_2.22 __iswblank_l F -GLIBC_2.22 __iswcntrl_l F -GLIBC_2.22 __iswctype F -GLIBC_2.22 __iswctype_l F -GLIBC_2.22 __iswdigit_l F -GLIBC_2.22 __iswgraph_l F -GLIBC_2.22 __iswlower_l F -GLIBC_2.22 __iswprint_l F -GLIBC_2.22 __iswpunct_l F -GLIBC_2.22 __iswspace_l F -GLIBC_2.22 __iswupper_l F -GLIBC_2.22 __iswxdigit_l F -GLIBC_2.22 __isxdigit_l F -GLIBC_2.22 __ivaliduser F -GLIBC_2.22 __libc_allocate_rtsig F -GLIBC_2.22 __libc_calloc F -GLIBC_2.22 __libc_current_sigrtmax F -GLIBC_2.22 __libc_current_sigrtmin F -GLIBC_2.22 __libc_free F -GLIBC_2.22 __libc_freeres F -GLIBC_2.22 __libc_init_first F -GLIBC_2.22 __libc_mallinfo F -GLIBC_2.22 __libc_malloc F -GLIBC_2.22 __libc_mallopt F -GLIBC_2.22 __libc_memalign F -GLIBC_2.22 __libc_pvalloc F -GLIBC_2.22 __libc_realloc F -GLIBC_2.22 __libc_start_main F -GLIBC_2.22 __libc_valloc F -GLIBC_2.22 __longjmp_chk F -GLIBC_2.22 __lseek F -GLIBC_2.22 __lxstat F -GLIBC_2.22 __lxstat64 F -GLIBC_2.22 __malloc_hook D 0x4 -GLIBC_2.22 __malloc_initialize_hook D 0x4 -GLIBC_2.22 __mbrlen F -GLIBC_2.22 __mbrtowc F -GLIBC_2.22 __mbsnrtowcs_chk F -GLIBC_2.22 __mbsrtowcs_chk F -GLIBC_2.22 __mbstowcs_chk F -GLIBC_2.22 __memalign_hook D 0x4 -GLIBC_2.22 __memcpy_chk F -GLIBC_2.22 __memmove_chk F -GLIBC_2.22 __mempcpy F -GLIBC_2.22 __mempcpy_chk F -GLIBC_2.22 __mempcpy_small F -GLIBC_2.22 __memset_chk F -GLIBC_2.22 __monstartup F -GLIBC_2.22 __morecore D 0x4 -GLIBC_2.22 __nanosleep F -GLIBC_2.22 __newlocale F -GLIBC_2.22 __nl_langinfo_l F -GLIBC_2.22 __nss_configure_lookup F -GLIBC_2.22 __nss_database_lookup F -GLIBC_2.22 __nss_group_lookup F -GLIBC_2.22 __nss_hostname_digits_dots F -GLIBC_2.22 __nss_hosts_lookup F -GLIBC_2.22 __nss_next F -GLIBC_2.22 __nss_passwd_lookup F -GLIBC_2.22 __obstack_printf_chk F -GLIBC_2.22 __obstack_vprintf_chk F -GLIBC_2.22 __open F -GLIBC_2.22 __open64 F -GLIBC_2.22 __open64_2 F -GLIBC_2.22 __open_2 F -GLIBC_2.22 __openat64_2 F -GLIBC_2.22 __openat_2 F -GLIBC_2.22 __overflow F -GLIBC_2.22 __pipe F -GLIBC_2.22 __poll F -GLIBC_2.22 __poll_chk F -GLIBC_2.22 __posix_getopt F -GLIBC_2.22 __ppoll_chk F -GLIBC_2.22 __pread64 F -GLIBC_2.22 __pread64_chk F -GLIBC_2.22 __pread_chk F -GLIBC_2.22 __printf_chk F -GLIBC_2.22 __printf_fp F -GLIBC_2.22 __profile_frequency F -GLIBC_2.22 __progname D 0x4 -GLIBC_2.22 __progname_full D 0x4 -GLIBC_2.22 __ptsname_r_chk F -GLIBC_2.22 __pwrite64 F -GLIBC_2.22 __rawmemchr F -GLIBC_2.22 __rcmd_errstr D 0x4 -GLIBC_2.22 __read F -GLIBC_2.22 __read_chk F -GLIBC_2.22 __readlink_chk F -GLIBC_2.22 __readlinkat_chk F -GLIBC_2.22 __realloc_hook D 0x4 -GLIBC_2.22 __realpath_chk F -GLIBC_2.22 __recv_chk F -GLIBC_2.22 __recvfrom_chk F -GLIBC_2.22 __register_atfork F -GLIBC_2.22 __res_init F -GLIBC_2.22 __res_nclose F -GLIBC_2.22 __res_ninit F -GLIBC_2.22 __res_randomid F -GLIBC_2.22 __res_state F -GLIBC_2.22 __sbrk F -GLIBC_2.22 __sched_cpualloc F -GLIBC_2.22 __sched_cpucount F -GLIBC_2.22 __sched_cpufree F -GLIBC_2.22 __sched_get_priority_max F -GLIBC_2.22 __sched_get_priority_min F -GLIBC_2.22 __sched_getparam F -GLIBC_2.22 __sched_getscheduler F -GLIBC_2.22 __sched_setscheduler F -GLIBC_2.22 __sched_yield F -GLIBC_2.22 __select F -GLIBC_2.22 __send F -GLIBC_2.22 __setpgid F -GLIBC_2.22 __sigaction F -GLIBC_2.22 __sigaddset F -GLIBC_2.22 __sigdelset F -GLIBC_2.22 __sigismember F -GLIBC_2.22 __signbit F -GLIBC_2.22 __signbitf F -GLIBC_2.22 __sigpause F -GLIBC_2.22 __sigsetjmp F -GLIBC_2.22 __sigsuspend F -GLIBC_2.22 __snprintf_chk F -GLIBC_2.22 __sprintf_chk F -GLIBC_2.22 __stack_chk_fail F -GLIBC_2.22 __stpcpy F -GLIBC_2.22 __stpcpy_chk F -GLIBC_2.22 __stpcpy_small F -GLIBC_2.22 __stpncpy F -GLIBC_2.22 __stpncpy_chk F -GLIBC_2.22 __strcasecmp F -GLIBC_2.22 __strcasecmp_l F -GLIBC_2.22 __strcasestr F -GLIBC_2.22 __strcat_chk F -GLIBC_2.22 __strcoll_l F -GLIBC_2.22 __strcpy_chk F -GLIBC_2.22 __strcpy_small F -GLIBC_2.22 __strcspn_c1 F -GLIBC_2.22 __strcspn_c2 F -GLIBC_2.22 __strcspn_c3 F -GLIBC_2.22 __strdup F -GLIBC_2.22 __strerror_r F -GLIBC_2.22 __strfmon_l F -GLIBC_2.22 __strftime_l F -GLIBC_2.22 __strncasecmp_l F -GLIBC_2.22 __strncat_chk F -GLIBC_2.22 __strncpy_chk F -GLIBC_2.22 __strndup F -GLIBC_2.22 __strpbrk_c2 F -GLIBC_2.22 __strpbrk_c3 F -GLIBC_2.22 __strsep_1c F -GLIBC_2.22 __strsep_2c F -GLIBC_2.22 __strsep_3c F -GLIBC_2.22 __strsep_g F -GLIBC_2.22 __strspn_c1 F -GLIBC_2.22 __strspn_c2 F -GLIBC_2.22 __strspn_c3 F -GLIBC_2.22 __strtod_internal F -GLIBC_2.22 __strtod_l F -GLIBC_2.22 __strtof_internal F -GLIBC_2.22 __strtof_l F -GLIBC_2.22 __strtok_r F -GLIBC_2.22 __strtok_r_1c F -GLIBC_2.22 __strtol_internal F -GLIBC_2.22 __strtol_l F -GLIBC_2.22 __strtold_internal F -GLIBC_2.22 __strtold_l F -GLIBC_2.22 __strtoll_internal F -GLIBC_2.22 __strtoll_l F -GLIBC_2.22 __strtoul_internal F -GLIBC_2.22 __strtoul_l F -GLIBC_2.22 __strtoull_internal F -GLIBC_2.22 __strtoull_l F -GLIBC_2.22 __strverscmp F -GLIBC_2.22 __strxfrm_l F -GLIBC_2.22 __swprintf_chk F -GLIBC_2.22 __sysconf F -GLIBC_2.22 __syslog_chk F -GLIBC_2.22 __sysv_signal F -GLIBC_2.22 __timezone D 0x4 -GLIBC_2.22 __toascii_l F -GLIBC_2.22 __tolower_l F -GLIBC_2.22 __toupper_l F -GLIBC_2.22 __towctrans F -GLIBC_2.22 __towctrans_l F -GLIBC_2.22 __towlower_l F -GLIBC_2.22 __towupper_l F -GLIBC_2.22 __ttyname_r_chk F -GLIBC_2.22 __tzname D 0x8 -GLIBC_2.22 __uflow F -GLIBC_2.22 __underflow F -GLIBC_2.22 __uselocale F -GLIBC_2.22 __vasprintf_chk F -GLIBC_2.22 __vdprintf_chk F -GLIBC_2.22 __vfork F -GLIBC_2.22 __vfprintf_chk F -GLIBC_2.22 __vfscanf F -GLIBC_2.22 __vfwprintf_chk F -GLIBC_2.22 __vprintf_chk F -GLIBC_2.22 __vsnprintf F -GLIBC_2.22 __vsnprintf_chk F -GLIBC_2.22 __vsprintf_chk F -GLIBC_2.22 __vsscanf F -GLIBC_2.22 __vswprintf_chk F -GLIBC_2.22 __vsyslog_chk F -GLIBC_2.22 __vwprintf_chk F -GLIBC_2.22 __wait F -GLIBC_2.22 __waitpid F -GLIBC_2.22 __wcpcpy_chk F -GLIBC_2.22 __wcpncpy_chk F -GLIBC_2.22 __wcrtomb_chk F -GLIBC_2.22 __wcscasecmp_l F -GLIBC_2.22 __wcscat_chk F -GLIBC_2.22 __wcscoll_l F -GLIBC_2.22 __wcscpy_chk F -GLIBC_2.22 __wcsftime_l F -GLIBC_2.22 __wcsncasecmp_l F -GLIBC_2.22 __wcsncat_chk F -GLIBC_2.22 __wcsncpy_chk F -GLIBC_2.22 __wcsnrtombs_chk F -GLIBC_2.22 __wcsrtombs_chk F -GLIBC_2.22 __wcstod_internal F -GLIBC_2.22 __wcstod_l F -GLIBC_2.22 __wcstof_internal F -GLIBC_2.22 __wcstof_l F -GLIBC_2.22 __wcstol_internal F -GLIBC_2.22 __wcstol_l F -GLIBC_2.22 __wcstold_internal F -GLIBC_2.22 __wcstold_l F -GLIBC_2.22 __wcstoll_internal F -GLIBC_2.22 __wcstoll_l F -GLIBC_2.22 __wcstombs_chk F -GLIBC_2.22 __wcstoul_internal F -GLIBC_2.22 __wcstoul_l F -GLIBC_2.22 __wcstoull_internal F -GLIBC_2.22 __wcstoull_l F -GLIBC_2.22 __wcsxfrm_l F -GLIBC_2.22 __wctomb_chk F -GLIBC_2.22 __wctrans_l F -GLIBC_2.22 __wctype_l F -GLIBC_2.22 __wmemcpy_chk F -GLIBC_2.22 __wmemmove_chk F -GLIBC_2.22 __wmempcpy_chk F -GLIBC_2.22 __wmemset_chk F -GLIBC_2.22 __woverflow F -GLIBC_2.22 __wprintf_chk F -GLIBC_2.22 __write F -GLIBC_2.22 __wuflow F -GLIBC_2.22 __wunderflow F -GLIBC_2.22 __xmknod F -GLIBC_2.22 __xmknodat F -GLIBC_2.22 __xpg_basename F -GLIBC_2.22 __xpg_sigpause F -GLIBC_2.22 __xpg_strerror_r F -GLIBC_2.22 __xstat F -GLIBC_2.22 __xstat64 F -GLIBC_2.22 _dl_mcount_wrapper F -GLIBC_2.22 _dl_mcount_wrapper_check F -GLIBC_2.22 _environ D 0x4 -GLIBC_2.22 _exit F -GLIBC_2.22 _flushlbf F -GLIBC_2.22 _libc_intl_domainname D 0x5 -GLIBC_2.22 _longjmp F -GLIBC_2.22 _mcleanup F -GLIBC_2.22 _nl_default_dirname D 0xe -GLIBC_2.22 _nl_domain_bindings D 0x4 -GLIBC_2.22 _nl_msg_cat_cntr D 0x4 -GLIBC_2.22 _obstack_allocated_p F -GLIBC_2.22 _obstack_begin F -GLIBC_2.22 _obstack_begin_1 F -GLIBC_2.22 _obstack_free F -GLIBC_2.22 _obstack_memory_used F -GLIBC_2.22 _obstack_newchunk F -GLIBC_2.22 _res D 0x200 -GLIBC_2.22 _res_hconf D 0x30 -GLIBC_2.22 _setjmp F -GLIBC_2.22 _sys_siglist D 0x80 -GLIBC_2.22 _tolower F -GLIBC_2.22 _toupper F -GLIBC_2.22 a64l F -GLIBC_2.22 abort F -GLIBC_2.22 abs F -GLIBC_2.22 accept F -GLIBC_2.22 accept4 F -GLIBC_2.22 access F -GLIBC_2.22 acct F -GLIBC_2.22 addmntent F -GLIBC_2.22 addseverity F -GLIBC_2.22 adjtime F -GLIBC_2.22 advance F -GLIBC_2.22 alarm F -GLIBC_2.22 aligned_alloc F -GLIBC_2.22 alphasort F -GLIBC_2.22 alphasort64 F -GLIBC_2.22 argp_err_exit_status D 0x4 -GLIBC_2.22 argp_error F -GLIBC_2.22 argp_failure F -GLIBC_2.22 argp_help F -GLIBC_2.22 argp_parse F -GLIBC_2.22 argp_program_bug_address D 0x4 -GLIBC_2.22 argp_program_version D 0x4 -GLIBC_2.22 argp_program_version_hook D 0x4 -GLIBC_2.22 argp_state_help F -GLIBC_2.22 argp_usage F -GLIBC_2.22 argz_add F -GLIBC_2.22 argz_add_sep F -GLIBC_2.22 argz_append F -GLIBC_2.22 argz_count F -GLIBC_2.22 argz_create F -GLIBC_2.22 argz_create_sep F -GLIBC_2.22 argz_delete F -GLIBC_2.22 argz_extract F -GLIBC_2.22 argz_insert F -GLIBC_2.22 argz_next F -GLIBC_2.22 argz_replace F -GLIBC_2.22 argz_stringify F -GLIBC_2.22 asctime F -GLIBC_2.22 asctime_r F -GLIBC_2.22 asprintf F -GLIBC_2.22 atof F -GLIBC_2.22 atoi F -GLIBC_2.22 atol F -GLIBC_2.22 atoll F -GLIBC_2.22 backtrace F -GLIBC_2.22 backtrace_symbols F -GLIBC_2.22 backtrace_symbols_fd F -GLIBC_2.22 basename F -GLIBC_2.22 bcmp F -GLIBC_2.22 bcopy F -GLIBC_2.22 bind F -GLIBC_2.22 bind_textdomain_codeset F -GLIBC_2.22 bindtextdomain F -GLIBC_2.22 brk F -GLIBC_2.22 bsd_signal F -GLIBC_2.22 bsearch F -GLIBC_2.22 btowc F -GLIBC_2.22 bzero F -GLIBC_2.22 c16rtomb F -GLIBC_2.22 c32rtomb F -GLIBC_2.22 calloc F -GLIBC_2.22 canonicalize_file_name F -GLIBC_2.22 catclose F -GLIBC_2.22 catgets F -GLIBC_2.22 catopen F -GLIBC_2.22 cfgetispeed F -GLIBC_2.22 cfgetospeed F -GLIBC_2.22 cfmakeraw F -GLIBC_2.22 cfree F -GLIBC_2.22 cfsetispeed F -GLIBC_2.22 cfsetospeed F -GLIBC_2.22 cfsetspeed F -GLIBC_2.22 chdir F -GLIBC_2.22 chflags F -GLIBC_2.22 chmod F -GLIBC_2.22 chown F -GLIBC_2.22 chroot F -GLIBC_2.22 clearenv F -GLIBC_2.22 clearerr F -GLIBC_2.22 clearerr_unlocked F -GLIBC_2.22 clock F -GLIBC_2.22 clock_getcpuclockid F -GLIBC_2.22 clock_getres F -GLIBC_2.22 clock_gettime F -GLIBC_2.22 clock_nanosleep F -GLIBC_2.22 clock_settime F -GLIBC_2.22 close F -GLIBC_2.22 closedir F -GLIBC_2.22 closelog F -GLIBC_2.22 confstr F -GLIBC_2.22 connect F -GLIBC_2.22 copysign F -GLIBC_2.22 copysignf F -GLIBC_2.22 copysignl F -GLIBC_2.22 creat F -GLIBC_2.22 creat64 F -GLIBC_2.22 ctermid F -GLIBC_2.22 ctime F -GLIBC_2.22 ctime_r F -GLIBC_2.22 cuserid F -GLIBC_2.22 daemon F -GLIBC_2.22 daylight D 0x4 -GLIBC_2.22 dcgettext F -GLIBC_2.22 dcngettext F -GLIBC_2.22 dgettext F -GLIBC_2.22 difftime F -GLIBC_2.22 dirfd F -GLIBC_2.22 dirname F -GLIBC_2.22 div F -GLIBC_2.22 dl_iterate_phdr F -GLIBC_2.22 dngettext F -GLIBC_2.22 dprintf F -GLIBC_2.22 drand48 F -GLIBC_2.22 drand48_r F -GLIBC_2.22 dup F -GLIBC_2.22 dup2 F -GLIBC_2.22 dup3 F -GLIBC_2.22 duplocale F -GLIBC_2.22 dysize F -GLIBC_2.22 eaccess F -GLIBC_2.22 ecvt F -GLIBC_2.22 ecvt_r F -GLIBC_2.22 endaliasent F -GLIBC_2.22 endfsent F -GLIBC_2.22 endgrent F -GLIBC_2.22 endhostent F -GLIBC_2.22 endmntent F -GLIBC_2.22 endnetent F -GLIBC_2.22 endnetgrent F -GLIBC_2.22 endprotoent F -GLIBC_2.22 endpwent F -GLIBC_2.22 endservent F -GLIBC_2.22 endsgent F -GLIBC_2.22 endspent F -GLIBC_2.22 endttyent F -GLIBC_2.22 endusershell F -GLIBC_2.22 endutent F -GLIBC_2.22 endutxent F -GLIBC_2.22 environ D 0x4 -GLIBC_2.22 envz_add F -GLIBC_2.22 envz_entry F -GLIBC_2.22 envz_get F -GLIBC_2.22 envz_merge F -GLIBC_2.22 envz_remove F -GLIBC_2.22 envz_strip F -GLIBC_2.22 erand48 F -GLIBC_2.22 erand48_r F -GLIBC_2.22 err F -GLIBC_2.22 error F -GLIBC_2.22 error_at_line F -GLIBC_2.22 error_message_count D 0x4 -GLIBC_2.22 error_one_per_line D 0x4 -GLIBC_2.22 error_print_progname D 0x4 -GLIBC_2.22 errx F -GLIBC_2.22 ether_aton F -GLIBC_2.22 ether_aton_r F -GLIBC_2.22 ether_hostton F -GLIBC_2.22 ether_line F -GLIBC_2.22 ether_ntoa F -GLIBC_2.22 ether_ntoa_r F -GLIBC_2.22 ether_ntohost F -GLIBC_2.22 euidaccess F -GLIBC_2.22 execl F -GLIBC_2.22 execle F -GLIBC_2.22 execlp F -GLIBC_2.22 execv F -GLIBC_2.22 execve F -GLIBC_2.22 execvp F -GLIBC_2.22 execvpe F -GLIBC_2.22 exit F -GLIBC_2.22 faccessat F -GLIBC_2.22 fchdir F -GLIBC_2.22 fchflags F -GLIBC_2.22 fchmod F -GLIBC_2.22 fchmodat F -GLIBC_2.22 fchown F -GLIBC_2.22 fchownat F -GLIBC_2.22 fclose F -GLIBC_2.22 fcloseall F -GLIBC_2.22 fcntl F -GLIBC_2.22 fcvt F -GLIBC_2.22 fcvt_r F -GLIBC_2.22 fdatasync F -GLIBC_2.22 fdopen F -GLIBC_2.22 fdopendir F -GLIBC_2.22 feof F -GLIBC_2.22 feof_unlocked F -GLIBC_2.22 ferror F -GLIBC_2.22 ferror_unlocked F -GLIBC_2.22 fexecve F -GLIBC_2.22 fflush F -GLIBC_2.22 fflush_unlocked F -GLIBC_2.22 ffs F -GLIBC_2.22 ffsl F -GLIBC_2.22 ffsll F -GLIBC_2.22 fgetc F -GLIBC_2.22 fgetc_unlocked F -GLIBC_2.22 fgetgrent F -GLIBC_2.22 fgetgrent_r F -GLIBC_2.22 fgetpos F -GLIBC_2.22 fgetpos64 F -GLIBC_2.22 fgetpwent F -GLIBC_2.22 fgetpwent_r F -GLIBC_2.22 fgets F -GLIBC_2.22 fgets_unlocked F -GLIBC_2.22 fgetsgent F -GLIBC_2.22 fgetsgent_r F -GLIBC_2.22 fgetspent F -GLIBC_2.22 fgetspent_r F -GLIBC_2.22 fgetwc F -GLIBC_2.22 fgetwc_unlocked F -GLIBC_2.22 fgetws F -GLIBC_2.22 fgetws_unlocked F -GLIBC_2.22 fgetxattr F -GLIBC_2.22 fileno F -GLIBC_2.22 fileno_unlocked F -GLIBC_2.22 finite F -GLIBC_2.22 finitef F -GLIBC_2.22 finitel F -GLIBC_2.22 flistxattr F -GLIBC_2.22 flock F -GLIBC_2.22 flockfile F -GLIBC_2.22 fmemopen F -GLIBC_2.22 fmtmsg F -GLIBC_2.22 fnmatch F -GLIBC_2.22 fopen F -GLIBC_2.22 fopen64 F -GLIBC_2.22 fopencookie F -GLIBC_2.22 fork F -GLIBC_2.22 fpathconf F -GLIBC_2.22 fprintf F -GLIBC_2.22 fputc F -GLIBC_2.22 fputc_unlocked F -GLIBC_2.22 fputs F -GLIBC_2.22 fputs_unlocked F -GLIBC_2.22 fputwc F -GLIBC_2.22 fputwc_unlocked F -GLIBC_2.22 fputws F -GLIBC_2.22 fputws_unlocked F -GLIBC_2.22 fread F -GLIBC_2.22 fread_unlocked F -GLIBC_2.22 free F -GLIBC_2.22 freeaddrinfo F -GLIBC_2.22 freeifaddrs F -GLIBC_2.22 freelocale F -GLIBC_2.22 fremovexattr F -GLIBC_2.22 freopen F -GLIBC_2.22 freopen64 F -GLIBC_2.22 frexp F -GLIBC_2.22 frexpf F -GLIBC_2.22 frexpl F -GLIBC_2.22 fscanf F -GLIBC_2.22 fseek F -GLIBC_2.22 fseeko F -GLIBC_2.22 fseeko64 F -GLIBC_2.22 fsetpos F -GLIBC_2.22 fsetpos64 F -GLIBC_2.22 fsetxattr F -GLIBC_2.22 fstatfs F -GLIBC_2.22 fstatfs64 F -GLIBC_2.22 fstatvfs F -GLIBC_2.22 fstatvfs64 F -GLIBC_2.22 fsync F -GLIBC_2.22 ftell F -GLIBC_2.22 ftello F -GLIBC_2.22 ftello64 F -GLIBC_2.22 ftime F -GLIBC_2.22 ftok F -GLIBC_2.22 ftruncate F -GLIBC_2.22 ftruncate64 F -GLIBC_2.22 ftrylockfile F -GLIBC_2.22 fts_children F -GLIBC_2.22 fts_close F -GLIBC_2.22 fts_open F -GLIBC_2.22 fts_read F -GLIBC_2.22 fts_set F -GLIBC_2.22 ftw F -GLIBC_2.22 ftw64 F -GLIBC_2.22 funlockfile F -GLIBC_2.22 futimens F -GLIBC_2.22 futimes F -GLIBC_2.22 futimesat F -GLIBC_2.22 fwide F -GLIBC_2.22 fwprintf F -GLIBC_2.22 fwrite F -GLIBC_2.22 fwrite_unlocked F -GLIBC_2.22 fwscanf F -GLIBC_2.22 gai_strerror F -GLIBC_2.22 gcvt F -GLIBC_2.22 get_avphys_pages F -GLIBC_2.22 get_current_dir_name F -GLIBC_2.22 get_nprocs F -GLIBC_2.22 get_nprocs_conf F -GLIBC_2.22 get_phys_pages F -GLIBC_2.22 getaddrinfo F -GLIBC_2.22 getaliasbyname F -GLIBC_2.22 getaliasbyname_r F -GLIBC_2.22 getaliasent F -GLIBC_2.22 getaliasent_r F -GLIBC_2.22 getauxval F -GLIBC_2.22 getc F -GLIBC_2.22 getc_unlocked F -GLIBC_2.22 getchar F -GLIBC_2.22 getchar_unlocked F -GLIBC_2.22 getcontext F -GLIBC_2.22 getcwd F -GLIBC_2.22 getdate F -GLIBC_2.22 getdate_err D 0x4 -GLIBC_2.22 getdate_r F -GLIBC_2.22 getdelim F -GLIBC_2.22 getdomainname F -GLIBC_2.22 getdtablesize F -GLIBC_2.22 getegid F -GLIBC_2.22 getenv F -GLIBC_2.22 geteuid F -GLIBC_2.22 getfsent F -GLIBC_2.22 getfsfile F -GLIBC_2.22 getfsspec F -GLIBC_2.22 getgid F -GLIBC_2.22 getgrent F -GLIBC_2.22 getgrent_r F -GLIBC_2.22 getgrgid F -GLIBC_2.22 getgrgid_r F -GLIBC_2.22 getgrnam F -GLIBC_2.22 getgrnam_r F -GLIBC_2.22 getgrouplist F -GLIBC_2.22 getgroups F -GLIBC_2.22 gethostbyaddr F -GLIBC_2.22 gethostbyaddr_r F -GLIBC_2.22 gethostbyname F -GLIBC_2.22 gethostbyname2 F -GLIBC_2.22 gethostbyname2_r F -GLIBC_2.22 gethostbyname_r F -GLIBC_2.22 gethostent F -GLIBC_2.22 gethostent_r F -GLIBC_2.22 gethostid F -GLIBC_2.22 gethostname F -GLIBC_2.22 getifaddrs F -GLIBC_2.22 getipv4sourcefilter F -GLIBC_2.22 getitimer F -GLIBC_2.22 getline F -GLIBC_2.22 getloadavg F -GLIBC_2.22 getlogin F -GLIBC_2.22 getlogin_r F -GLIBC_2.22 getmntent F -GLIBC_2.22 getmntent_r F -GLIBC_2.22 getnameinfo F -GLIBC_2.22 getnetbyaddr F -GLIBC_2.22 getnetbyaddr_r F -GLIBC_2.22 getnetbyname F -GLIBC_2.22 getnetbyname_r F -GLIBC_2.22 getnetent F -GLIBC_2.22 getnetent_r F -GLIBC_2.22 getnetgrent F -GLIBC_2.22 getnetgrent_r F -GLIBC_2.22 getopt F -GLIBC_2.22 getopt_long F -GLIBC_2.22 getopt_long_only F -GLIBC_2.22 getpagesize F -GLIBC_2.22 getpass F -GLIBC_2.22 getpeername F -GLIBC_2.22 getpgid F -GLIBC_2.22 getpgrp F -GLIBC_2.22 getpid F -GLIBC_2.22 getppid F -GLIBC_2.22 getpriority F -GLIBC_2.22 getprotobyname F -GLIBC_2.22 getprotobyname_r F -GLIBC_2.22 getprotobynumber F -GLIBC_2.22 getprotobynumber_r F -GLIBC_2.22 getprotoent F -GLIBC_2.22 getprotoent_r F -GLIBC_2.22 getpt F -GLIBC_2.22 getpw F -GLIBC_2.22 getpwent F -GLIBC_2.22 getpwent_r F -GLIBC_2.22 getpwnam F -GLIBC_2.22 getpwnam_r F -GLIBC_2.22 getpwuid F -GLIBC_2.22 getpwuid_r F -GLIBC_2.22 getresgid F -GLIBC_2.22 getresuid F -GLIBC_2.22 getrlimit F -GLIBC_2.22 getrlimit64 F -GLIBC_2.22 getrusage F -GLIBC_2.22 gets F -GLIBC_2.22 getservbyname F -GLIBC_2.22 getservbyname_r F -GLIBC_2.22 getservbyport F -GLIBC_2.22 getservbyport_r F -GLIBC_2.22 getservent F -GLIBC_2.22 getservent_r F -GLIBC_2.22 getsgent F -GLIBC_2.22 getsgent_r F -GLIBC_2.22 getsgnam F -GLIBC_2.22 getsgnam_r F -GLIBC_2.22 getsid F -GLIBC_2.22 getsockname F -GLIBC_2.22 getsockopt F -GLIBC_2.22 getsourcefilter F -GLIBC_2.22 getspent F -GLIBC_2.22 getspent_r F -GLIBC_2.22 getspnam F -GLIBC_2.22 getspnam_r F -GLIBC_2.22 getsubopt F -GLIBC_2.22 gettext F -GLIBC_2.22 gettimeofday F -GLIBC_2.22 getttyent F -GLIBC_2.22 getttynam F -GLIBC_2.22 getuid F -GLIBC_2.22 getusershell F -GLIBC_2.22 getutent F -GLIBC_2.22 getutent_r F -GLIBC_2.22 getutid F -GLIBC_2.22 getutid_r F -GLIBC_2.22 getutline F -GLIBC_2.22 getutline_r F -GLIBC_2.22 getutmp F -GLIBC_2.22 getutmpx F -GLIBC_2.22 getutxent F -GLIBC_2.22 getutxid F -GLIBC_2.22 getutxline F -GLIBC_2.22 getw F -GLIBC_2.22 getwc F -GLIBC_2.22 getwc_unlocked F -GLIBC_2.22 getwchar F -GLIBC_2.22 getwchar_unlocked F -GLIBC_2.22 getwd F -GLIBC_2.22 getxattr F -GLIBC_2.22 glob F -GLIBC_2.22 glob64 F -GLIBC_2.22 glob_pattern_p F -GLIBC_2.22 globfree F -GLIBC_2.22 globfree64 F -GLIBC_2.22 gmtime F -GLIBC_2.22 gmtime_r F -GLIBC_2.22 gnu_get_libc_release F -GLIBC_2.22 gnu_get_libc_version F -GLIBC_2.22 grantpt F -GLIBC_2.22 group_member F -GLIBC_2.22 gsignal F -GLIBC_2.22 gtty F -GLIBC_2.22 h_errlist D 0x14 -GLIBC_2.22 h_nerr D 0x4 -GLIBC_2.22 hasmntopt F -GLIBC_2.22 hcreate F -GLIBC_2.22 hcreate_r F -GLIBC_2.22 hdestroy F -GLIBC_2.22 hdestroy_r F -GLIBC_2.22 herror F -GLIBC_2.22 hsearch F -GLIBC_2.22 hsearch_r F -GLIBC_2.22 hstrerror F -GLIBC_2.22 htonl F -GLIBC_2.22 htons F -GLIBC_2.22 iconv F -GLIBC_2.22 iconv_close F -GLIBC_2.22 iconv_open F -GLIBC_2.22 if_freenameindex F -GLIBC_2.22 if_indextoname F -GLIBC_2.22 if_nameindex F -GLIBC_2.22 if_nametoindex F -GLIBC_2.22 imaxabs F -GLIBC_2.22 imaxdiv F -GLIBC_2.22 in6addr_any D 0x10 -GLIBC_2.22 in6addr_loopback D 0x10 -GLIBC_2.22 index F -GLIBC_2.22 inet6_opt_append F -GLIBC_2.22 inet6_opt_find F -GLIBC_2.22 inet6_opt_finish F -GLIBC_2.22 inet6_opt_get_val F -GLIBC_2.22 inet6_opt_init F -GLIBC_2.22 inet6_opt_next F -GLIBC_2.22 inet6_opt_set_val F -GLIBC_2.22 inet6_option_alloc F -GLIBC_2.22 inet6_option_append F -GLIBC_2.22 inet6_option_find F -GLIBC_2.22 inet6_option_init F -GLIBC_2.22 inet6_option_next F -GLIBC_2.22 inet6_option_space F -GLIBC_2.22 inet6_rth_add F -GLIBC_2.22 inet6_rth_getaddr F -GLIBC_2.22 inet6_rth_init F -GLIBC_2.22 inet6_rth_reverse F -GLIBC_2.22 inet6_rth_segments F -GLIBC_2.22 inet6_rth_space F -GLIBC_2.22 inet_addr F -GLIBC_2.22 inet_aton F -GLIBC_2.22 inet_lnaof F -GLIBC_2.22 inet_makeaddr F -GLIBC_2.22 inet_netof F -GLIBC_2.22 inet_network F -GLIBC_2.22 inet_nsap_addr F -GLIBC_2.22 inet_nsap_ntoa F -GLIBC_2.22 inet_ntoa F -GLIBC_2.22 inet_ntop F -GLIBC_2.22 inet_pton F -GLIBC_2.22 initgroups F -GLIBC_2.22 initstate F -GLIBC_2.22 initstate_r F -GLIBC_2.22 innetgr F -GLIBC_2.22 insque F -GLIBC_2.22 ioctl F -GLIBC_2.22 iruserok F -GLIBC_2.22 iruserok_af F -GLIBC_2.22 isalnum F -GLIBC_2.22 isalnum_l F -GLIBC_2.22 isalpha F -GLIBC_2.22 isalpha_l F -GLIBC_2.22 isascii F -GLIBC_2.22 isatty F -GLIBC_2.22 isblank F -GLIBC_2.22 isblank_l F -GLIBC_2.22 iscntrl F -GLIBC_2.22 iscntrl_l F -GLIBC_2.22 isctype F -GLIBC_2.22 isdigit F -GLIBC_2.22 isdigit_l F -GLIBC_2.22 isfdtype F -GLIBC_2.22 isgraph F -GLIBC_2.22 isgraph_l F -GLIBC_2.22 isinf F -GLIBC_2.22 isinff F -GLIBC_2.22 isinfl F -GLIBC_2.22 islower F -GLIBC_2.22 islower_l F -GLIBC_2.22 isnan F -GLIBC_2.22 isnanf F -GLIBC_2.22 isnanl F -GLIBC_2.22 isprint F -GLIBC_2.22 isprint_l F -GLIBC_2.22 ispunct F -GLIBC_2.22 ispunct_l F -GLIBC_2.22 isspace F -GLIBC_2.22 isspace_l F -GLIBC_2.22 isupper F -GLIBC_2.22 isupper_l F -GLIBC_2.22 iswalnum F -GLIBC_2.22 iswalnum_l F -GLIBC_2.22 iswalpha F -GLIBC_2.22 iswalpha_l F -GLIBC_2.22 iswblank F -GLIBC_2.22 iswblank_l F -GLIBC_2.22 iswcntrl F -GLIBC_2.22 iswcntrl_l F -GLIBC_2.22 iswctype F -GLIBC_2.22 iswctype_l F -GLIBC_2.22 iswdigit F -GLIBC_2.22 iswdigit_l F -GLIBC_2.22 iswgraph F -GLIBC_2.22 iswgraph_l F -GLIBC_2.22 iswlower F -GLIBC_2.22 iswlower_l F -GLIBC_2.22 iswprint F -GLIBC_2.22 iswprint_l F -GLIBC_2.22 iswpunct F -GLIBC_2.22 iswpunct_l F -GLIBC_2.22 iswspace F -GLIBC_2.22 iswspace_l F -GLIBC_2.22 iswupper F -GLIBC_2.22 iswupper_l F -GLIBC_2.22 iswxdigit F -GLIBC_2.22 iswxdigit_l F -GLIBC_2.22 isxdigit F -GLIBC_2.22 isxdigit_l F -GLIBC_2.22 jrand48 F -GLIBC_2.22 jrand48_r F -GLIBC_2.22 kill F -GLIBC_2.22 killpg F -GLIBC_2.22 l64a F -GLIBC_2.22 labs F -GLIBC_2.22 lchmod F -GLIBC_2.22 lchown F -GLIBC_2.22 lckpwdf F -GLIBC_2.22 lcong48 F -GLIBC_2.22 lcong48_r F -GLIBC_2.22 ldexp F -GLIBC_2.22 ldexpf F -GLIBC_2.22 ldexpl F -GLIBC_2.22 ldiv F -GLIBC_2.22 lfind F -GLIBC_2.22 lgetxattr F -GLIBC_2.22 link F -GLIBC_2.22 linkat F -GLIBC_2.22 listen F -GLIBC_2.22 listxattr F -GLIBC_2.22 llabs F -GLIBC_2.22 lldiv F -GLIBC_2.22 llistxattr F -GLIBC_2.22 loc1 D 0x4 -GLIBC_2.22 loc2 D 0x4 -GLIBC_2.22 localeconv F -GLIBC_2.22 localtime F -GLIBC_2.22 localtime_r F -GLIBC_2.22 lockf F -GLIBC_2.22 lockf64 F -GLIBC_2.22 locs D 0x4 -GLIBC_2.22 longjmp F -GLIBC_2.22 lrand48 F -GLIBC_2.22 lrand48_r F -GLIBC_2.22 lremovexattr F -GLIBC_2.22 lsearch F -GLIBC_2.22 lseek F -GLIBC_2.22 lseek64 F -GLIBC_2.22 lsetxattr F -GLIBC_2.22 lutimes F -GLIBC_2.22 madvise F -GLIBC_2.22 makecontext F -GLIBC_2.22 mallinfo F -GLIBC_2.22 malloc F -GLIBC_2.22 malloc_get_state F -GLIBC_2.22 malloc_info F -GLIBC_2.22 malloc_set_state F -GLIBC_2.22 malloc_stats F -GLIBC_2.22 malloc_trim F -GLIBC_2.22 malloc_usable_size F -GLIBC_2.22 mallopt F -GLIBC_2.22 mallwatch D 0x4 -GLIBC_2.22 mblen F -GLIBC_2.22 mbrlen F -GLIBC_2.22 mbrtoc16 F -GLIBC_2.22 mbrtoc32 F -GLIBC_2.22 mbrtowc F -GLIBC_2.22 mbsinit F -GLIBC_2.22 mbsnrtowcs F -GLIBC_2.22 mbsrtowcs F -GLIBC_2.22 mbstowcs F -GLIBC_2.22 mbtowc F -GLIBC_2.22 mcheck F -GLIBC_2.22 mcheck_check_all F -GLIBC_2.22 mcheck_pedantic F -GLIBC_2.22 memalign F -GLIBC_2.22 memccpy F -GLIBC_2.22 memchr F -GLIBC_2.22 memcmp F -GLIBC_2.22 memcpy F -GLIBC_2.22 memfrob F -GLIBC_2.22 memmem F -GLIBC_2.22 memmove F -GLIBC_2.22 mempcpy F -GLIBC_2.22 memrchr F -GLIBC_2.22 memset F -GLIBC_2.22 mincore F -GLIBC_2.22 mkdir F -GLIBC_2.22 mkdirat F -GLIBC_2.22 mkdtemp F -GLIBC_2.22 mkfifo F -GLIBC_2.22 mkfifoat F -GLIBC_2.22 mkostemp F -GLIBC_2.22 mkostemp64 F -GLIBC_2.22 mkostemps F -GLIBC_2.22 mkostemps64 F -GLIBC_2.22 mkstemp F -GLIBC_2.22 mkstemp64 F -GLIBC_2.22 mkstemps F -GLIBC_2.22 mkstemps64 F -GLIBC_2.22 mktemp F -GLIBC_2.22 mktime F -GLIBC_2.22 mlock F -GLIBC_2.22 mlockall F -GLIBC_2.22 mmap F -GLIBC_2.22 mmap64 F -GLIBC_2.22 modf F -GLIBC_2.22 modff F -GLIBC_2.22 modfl F -GLIBC_2.22 moncontrol F -GLIBC_2.22 monstartup F -GLIBC_2.22 mprobe F -GLIBC_2.22 mprotect F -GLIBC_2.22 mrand48 F -GLIBC_2.22 mrand48_r F -GLIBC_2.22 msgctl F -GLIBC_2.22 msgget F -GLIBC_2.22 msgrcv F -GLIBC_2.22 msgsnd F -GLIBC_2.22 msync F -GLIBC_2.22 mtrace F -GLIBC_2.22 munlock F -GLIBC_2.22 munlockall F -GLIBC_2.22 munmap F -GLIBC_2.22 muntrace F -GLIBC_2.22 nacl_interface_ext_supply F -GLIBC_2.22 nacl_interface_query F -GLIBC_2.22 nanosleep F -GLIBC_2.22 newlocale F -GLIBC_2.22 nftw F -GLIBC_2.22 nftw64 F -GLIBC_2.22 ngettext F -GLIBC_2.22 nice F -GLIBC_2.22 nl_langinfo F -GLIBC_2.22 nl_langinfo_l F -GLIBC_2.22 nrand48 F -GLIBC_2.22 nrand48_r F -GLIBC_2.22 ntohl F -GLIBC_2.22 ntohs F -GLIBC_2.22 obstack_alloc_failed_handler D 0x4 -GLIBC_2.22 obstack_exit_failure D 0x4 -GLIBC_2.22 obstack_free F -GLIBC_2.22 obstack_printf F -GLIBC_2.22 obstack_vprintf F -GLIBC_2.22 on_exit F -GLIBC_2.22 open F -GLIBC_2.22 open64 F -GLIBC_2.22 open_memstream F -GLIBC_2.22 open_wmemstream F -GLIBC_2.22 openat F -GLIBC_2.22 openat64 F -GLIBC_2.22 opendir F -GLIBC_2.22 openlog F -GLIBC_2.22 optarg D 0x4 -GLIBC_2.22 opterr D 0x4 -GLIBC_2.22 optind D 0x4 -GLIBC_2.22 optopt D 0x4 -GLIBC_2.22 parse_printf_format F -GLIBC_2.22 pathconf F -GLIBC_2.22 pause F -GLIBC_2.22 pclose F -GLIBC_2.22 perror F -GLIBC_2.22 pipe F -GLIBC_2.22 pipe2 F -GLIBC_2.22 poll F -GLIBC_2.22 popen F -GLIBC_2.22 posix_fadvise F -GLIBC_2.22 posix_fadvise64 F -GLIBC_2.22 posix_fallocate F -GLIBC_2.22 posix_fallocate64 F -GLIBC_2.22 posix_madvise F -GLIBC_2.22 posix_memalign F -GLIBC_2.22 posix_openpt F -GLIBC_2.22 posix_spawn F -GLIBC_2.22 posix_spawn_file_actions_addclose F -GLIBC_2.22 posix_spawn_file_actions_adddup2 F -GLIBC_2.22 posix_spawn_file_actions_addopen F -GLIBC_2.22 posix_spawn_file_actions_destroy F -GLIBC_2.22 posix_spawn_file_actions_init F -GLIBC_2.22 posix_spawnattr_destroy F -GLIBC_2.22 posix_spawnattr_getflags F -GLIBC_2.22 posix_spawnattr_getpgroup F -GLIBC_2.22 posix_spawnattr_getschedparam F -GLIBC_2.22 posix_spawnattr_getschedpolicy F -GLIBC_2.22 posix_spawnattr_getsigdefault F -GLIBC_2.22 posix_spawnattr_getsigmask F -GLIBC_2.22 posix_spawnattr_init F -GLIBC_2.22 posix_spawnattr_setflags F -GLIBC_2.22 posix_spawnattr_setpgroup F -GLIBC_2.22 posix_spawnattr_setschedparam F -GLIBC_2.22 posix_spawnattr_setschedpolicy F -GLIBC_2.22 posix_spawnattr_setsigdefault F -GLIBC_2.22 posix_spawnattr_setsigmask F -GLIBC_2.22 posix_spawnp F -GLIBC_2.22 ppoll F -GLIBC_2.22 pread F -GLIBC_2.22 pread64 F -GLIBC_2.22 preadv F -GLIBC_2.22 preadv64 F -GLIBC_2.22 printf F -GLIBC_2.22 printf_size F -GLIBC_2.22 printf_size_info F -GLIBC_2.22 profil F -GLIBC_2.22 program_invocation_name D 0x4 -GLIBC_2.22 program_invocation_short_name D 0x4 -GLIBC_2.22 pselect F -GLIBC_2.22 psiginfo F -GLIBC_2.22 psignal F -GLIBC_2.22 pthread_attr_destroy F -GLIBC_2.22 pthread_attr_getdetachstate F -GLIBC_2.22 pthread_attr_getinheritsched F -GLIBC_2.22 pthread_attr_getschedparam F -GLIBC_2.22 pthread_attr_getschedpolicy F -GLIBC_2.22 pthread_attr_getscope F -GLIBC_2.22 pthread_attr_init F -GLIBC_2.22 pthread_attr_setdetachstate F -GLIBC_2.22 pthread_attr_setinheritsched F -GLIBC_2.22 pthread_attr_setschedparam F -GLIBC_2.22 pthread_attr_setschedpolicy F -GLIBC_2.22 pthread_attr_setscope F -GLIBC_2.22 pthread_cond_broadcast F -GLIBC_2.22 pthread_cond_destroy F -GLIBC_2.22 pthread_cond_init F -GLIBC_2.22 pthread_cond_signal F -GLIBC_2.22 pthread_cond_timedwait F -GLIBC_2.22 pthread_cond_wait F -GLIBC_2.22 pthread_condattr_destroy F -GLIBC_2.22 pthread_condattr_init F -GLIBC_2.22 pthread_equal F -GLIBC_2.22 pthread_exit F -GLIBC_2.22 pthread_getschedparam F -GLIBC_2.22 pthread_mutex_destroy F -GLIBC_2.22 pthread_mutex_init F -GLIBC_2.22 pthread_mutex_lock F -GLIBC_2.22 pthread_mutex_unlock F -GLIBC_2.22 pthread_self F -GLIBC_2.22 pthread_setcancelstate F -GLIBC_2.22 pthread_setcanceltype F -GLIBC_2.22 pthread_setschedparam F -GLIBC_2.22 ptrace F -GLIBC_2.22 ptsname F -GLIBC_2.22 ptsname_r F -GLIBC_2.22 putc F -GLIBC_2.22 putc_unlocked F -GLIBC_2.22 putchar F -GLIBC_2.22 putchar_unlocked F -GLIBC_2.22 putenv F -GLIBC_2.22 putgrent F -GLIBC_2.22 putpwent F -GLIBC_2.22 puts F -GLIBC_2.22 putsgent F -GLIBC_2.22 putspent F -GLIBC_2.22 pututline F -GLIBC_2.22 pututxline F -GLIBC_2.22 putw F -GLIBC_2.22 putwc F -GLIBC_2.22 putwc_unlocked F -GLIBC_2.22 putwchar F -GLIBC_2.22 putwchar_unlocked F -GLIBC_2.22 pvalloc F -GLIBC_2.22 pwrite F -GLIBC_2.22 pwrite64 F -GLIBC_2.22 pwritev F -GLIBC_2.22 pwritev64 F -GLIBC_2.22 qecvt F -GLIBC_2.22 qecvt_r F -GLIBC_2.22 qfcvt F -GLIBC_2.22 qfcvt_r F -GLIBC_2.22 qgcvt F -GLIBC_2.22 qsort F -GLIBC_2.22 qsort_r F -GLIBC_2.22 quick_exit F -GLIBC_2.22 raise F -GLIBC_2.22 rand F -GLIBC_2.22 rand_r F -GLIBC_2.22 random F -GLIBC_2.22 random_r F -GLIBC_2.22 rawmemchr F -GLIBC_2.22 rcmd F -GLIBC_2.22 rcmd_af F -GLIBC_2.22 re_comp F -GLIBC_2.22 re_compile_fastmap F -GLIBC_2.22 re_compile_pattern F -GLIBC_2.22 re_exec F -GLIBC_2.22 re_match F -GLIBC_2.22 re_match_2 F -GLIBC_2.22 re_search F -GLIBC_2.22 re_search_2 F -GLIBC_2.22 re_set_registers F -GLIBC_2.22 re_set_syntax F -GLIBC_2.22 re_syntax_options D 0x4 -GLIBC_2.22 read F -GLIBC_2.22 readdir F -GLIBC_2.22 readdir64 F -GLIBC_2.22 readdir64_r F -GLIBC_2.22 readdir_r F -GLIBC_2.22 readlink F -GLIBC_2.22 readlinkat F -GLIBC_2.22 readv F -GLIBC_2.22 realloc F -GLIBC_2.22 realpath F -GLIBC_2.22 reboot F -GLIBC_2.22 recv F -GLIBC_2.22 recvfrom F -GLIBC_2.22 recvmmsg F -GLIBC_2.22 recvmsg F -GLIBC_2.22 regcomp F -GLIBC_2.22 regerror F -GLIBC_2.22 regexec F -GLIBC_2.22 regfree F -GLIBC_2.22 register_printf_function F -GLIBC_2.22 register_printf_modifier F -GLIBC_2.22 register_printf_specifier F -GLIBC_2.22 register_printf_type F -GLIBC_2.22 remap_file_pages F -GLIBC_2.22 remove F -GLIBC_2.22 removexattr F -GLIBC_2.22 remque F -GLIBC_2.22 rename F -GLIBC_2.22 renameat F -GLIBC_2.22 revoke F -GLIBC_2.22 rewind F -GLIBC_2.22 rewinddir F -GLIBC_2.22 rexec F -GLIBC_2.22 rexec_af F -GLIBC_2.22 rexecoptions D 0x4 -GLIBC_2.22 rindex F -GLIBC_2.22 rmdir F -GLIBC_2.22 rpmatch F -GLIBC_2.22 rresvport F -GLIBC_2.22 rresvport_af F -GLIBC_2.22 ruserok F -GLIBC_2.22 ruserok_af F -GLIBC_2.22 ruserpass F -GLIBC_2.22 sbrk F -GLIBC_2.22 scalbn F -GLIBC_2.22 scalbnf F -GLIBC_2.22 scalbnl F -GLIBC_2.22 scandir F -GLIBC_2.22 scandir64 F -GLIBC_2.22 scandirat F -GLIBC_2.22 scandirat64 F -GLIBC_2.22 scanf F -GLIBC_2.22 sched_get_priority_max F -GLIBC_2.22 sched_get_priority_min F -GLIBC_2.22 sched_getaffinity F -GLIBC_2.22 sched_getparam F -GLIBC_2.22 sched_getscheduler F -GLIBC_2.22 sched_rr_get_interval F -GLIBC_2.22 sched_setaffinity F -GLIBC_2.22 sched_setparam F -GLIBC_2.22 sched_setscheduler F -GLIBC_2.22 sched_yield F -GLIBC_2.22 secure_getenv F -GLIBC_2.22 seed48 F -GLIBC_2.22 seed48_r F -GLIBC_2.22 seekdir F -GLIBC_2.22 select F -GLIBC_2.22 semctl F -GLIBC_2.22 semget F -GLIBC_2.22 semop F -GLIBC_2.22 semtimedop F -GLIBC_2.22 send F -GLIBC_2.22 sendfile F -GLIBC_2.22 sendfile64 F -GLIBC_2.22 sendmmsg F -GLIBC_2.22 sendmsg F -GLIBC_2.22 sendto F -GLIBC_2.22 setaliasent F -GLIBC_2.22 setbuf F -GLIBC_2.22 setbuffer F -GLIBC_2.22 setcontext F -GLIBC_2.22 setdomainname F -GLIBC_2.22 setegid F -GLIBC_2.22 setenv F -GLIBC_2.22 seteuid F -GLIBC_2.22 setfsent F -GLIBC_2.22 setgid F -GLIBC_2.22 setgrent F -GLIBC_2.22 setgroups F -GLIBC_2.22 sethostent F -GLIBC_2.22 sethostid F -GLIBC_2.22 sethostname F -GLIBC_2.22 setipv4sourcefilter F -GLIBC_2.22 setitimer F -GLIBC_2.22 setjmp F -GLIBC_2.22 setlinebuf F -GLIBC_2.22 setlocale F -GLIBC_2.22 setlogin F -GLIBC_2.22 setlogmask F -GLIBC_2.22 setmntent F -GLIBC_2.22 setnetent F -GLIBC_2.22 setnetgrent F -GLIBC_2.22 setpgid F -GLIBC_2.22 setpgrp F -GLIBC_2.22 setpriority F -GLIBC_2.22 setprotoent F -GLIBC_2.22 setpwent F -GLIBC_2.22 setregid F -GLIBC_2.22 setresgid F -GLIBC_2.22 setresuid F -GLIBC_2.22 setreuid F -GLIBC_2.22 setrlimit F -GLIBC_2.22 setrlimit64 F -GLIBC_2.22 setservent F -GLIBC_2.22 setsgent F -GLIBC_2.22 setsid F -GLIBC_2.22 setsockopt F -GLIBC_2.22 setsourcefilter F -GLIBC_2.22 setspent F -GLIBC_2.22 setstate F -GLIBC_2.22 setstate_r F -GLIBC_2.22 settimeofday F -GLIBC_2.22 setttyent F -GLIBC_2.22 setuid F -GLIBC_2.22 setusershell F -GLIBC_2.22 setutent F -GLIBC_2.22 setutxent F -GLIBC_2.22 setvbuf F -GLIBC_2.22 setxattr F -GLIBC_2.22 sgetsgent F -GLIBC_2.22 sgetsgent_r F -GLIBC_2.22 sgetspent F -GLIBC_2.22 sgetspent_r F -GLIBC_2.22 shmat F -GLIBC_2.22 shmctl F -GLIBC_2.22 shmdt F -GLIBC_2.22 shmget F -GLIBC_2.22 shutdown F -GLIBC_2.22 sigaction F -GLIBC_2.22 sigaddset F -GLIBC_2.22 sigaltstack F -GLIBC_2.22 sigandset F -GLIBC_2.22 sigblock F -GLIBC_2.22 sigdelset F -GLIBC_2.22 sigemptyset F -GLIBC_2.22 sigfillset F -GLIBC_2.22 siggetmask F -GLIBC_2.22 sighold F -GLIBC_2.22 sigignore F -GLIBC_2.22 siginterrupt F -GLIBC_2.22 sigisemptyset F -GLIBC_2.22 sigismember F -GLIBC_2.22 siglongjmp F -GLIBC_2.22 signal F -GLIBC_2.22 sigorset F -GLIBC_2.22 sigpause F -GLIBC_2.22 sigpending F -GLIBC_2.22 sigprocmask F -GLIBC_2.22 sigqueue F -GLIBC_2.22 sigrelse F -GLIBC_2.22 sigreturn F -GLIBC_2.22 sigset F -GLIBC_2.22 sigsetmask F -GLIBC_2.22 sigstack F -GLIBC_2.22 sigsuspend F -GLIBC_2.22 sigtimedwait F -GLIBC_2.22 sigwait F -GLIBC_2.22 sigwaitinfo F -GLIBC_2.22 sleep F -GLIBC_2.22 snprintf F -GLIBC_2.22 sockatmark F -GLIBC_2.22 socket F -GLIBC_2.22 socketpair F -GLIBC_2.22 sprintf F -GLIBC_2.22 sprofil F -GLIBC_2.22 srand F -GLIBC_2.22 srand48 F -GLIBC_2.22 srand48_r F -GLIBC_2.22 srandom F -GLIBC_2.22 srandom_r F -GLIBC_2.22 sscanf F -GLIBC_2.22 ssignal F -GLIBC_2.22 sstk F -GLIBC_2.22 statfs F -GLIBC_2.22 statfs64 F -GLIBC_2.22 statvfs F -GLIBC_2.22 statvfs64 F -GLIBC_2.22 stderr D 0x4 -GLIBC_2.22 stdin D 0x4 -GLIBC_2.22 stdout D 0x4 -GLIBC_2.22 step F -GLIBC_2.22 stime F -GLIBC_2.22 stpcpy F -GLIBC_2.22 stpncpy F -GLIBC_2.22 strcasecmp F -GLIBC_2.22 strcasecmp_l F -GLIBC_2.22 strcasestr F -GLIBC_2.22 strcat F -GLIBC_2.22 strchr F -GLIBC_2.22 strchrnul F -GLIBC_2.22 strcmp F -GLIBC_2.22 strcoll F -GLIBC_2.22 strcoll_l F -GLIBC_2.22 strcpy F -GLIBC_2.22 strcspn F -GLIBC_2.22 strdup F -GLIBC_2.22 strerror F -GLIBC_2.22 strerror_l F -GLIBC_2.22 strerror_r F -GLIBC_2.22 strfmon F -GLIBC_2.22 strfmon_l F -GLIBC_2.22 strfry F -GLIBC_2.22 strftime F -GLIBC_2.22 strftime_l F -GLIBC_2.22 strlen F -GLIBC_2.22 strncasecmp F -GLIBC_2.22 strncasecmp_l F -GLIBC_2.22 strncat F -GLIBC_2.22 strncmp F -GLIBC_2.22 strncpy F -GLIBC_2.22 strndup F -GLIBC_2.22 strnlen F -GLIBC_2.22 strpbrk F -GLIBC_2.22 strptime F -GLIBC_2.22 strptime_l F -GLIBC_2.22 strrchr F -GLIBC_2.22 strsep F -GLIBC_2.22 strsignal F -GLIBC_2.22 strspn F -GLIBC_2.22 strstr F -GLIBC_2.22 strtod F -GLIBC_2.22 strtod_l F -GLIBC_2.22 strtof F -GLIBC_2.22 strtof_l F -GLIBC_2.22 strtoimax F -GLIBC_2.22 strtok F -GLIBC_2.22 strtok_r F -GLIBC_2.22 strtol F -GLIBC_2.22 strtol_l F -GLIBC_2.22 strtold F -GLIBC_2.22 strtold_l F -GLIBC_2.22 strtoll F -GLIBC_2.22 strtoll_l F -GLIBC_2.22 strtoq F -GLIBC_2.22 strtoul F -GLIBC_2.22 strtoul_l F -GLIBC_2.22 strtoull F -GLIBC_2.22 strtoull_l F -GLIBC_2.22 strtoumax F -GLIBC_2.22 strtouq F -GLIBC_2.22 strverscmp F -GLIBC_2.22 strxfrm F -GLIBC_2.22 strxfrm_l F -GLIBC_2.22 stty F -GLIBC_2.22 swab F -GLIBC_2.22 swapcontext F -GLIBC_2.22 swprintf F -GLIBC_2.22 swscanf F -GLIBC_2.22 symlink F -GLIBC_2.22 symlinkat F -GLIBC_2.22 sync F -GLIBC_2.22 syncfs F -GLIBC_2.22 sys_sigabbrev D 0x80 -GLIBC_2.22 sys_siglist D 0x80 -GLIBC_2.22 syscall F -GLIBC_2.22 sysconf F -GLIBC_2.22 syslog F -GLIBC_2.22 system F -GLIBC_2.22 sysv_signal F -GLIBC_2.22 tcdrain F -GLIBC_2.22 tcflow F -GLIBC_2.22 tcflush F -GLIBC_2.22 tcgetattr F -GLIBC_2.22 tcgetpgrp F -GLIBC_2.22 tcgetsid F -GLIBC_2.22 tcsendbreak F -GLIBC_2.22 tcsetattr F -GLIBC_2.22 tcsetpgrp F -GLIBC_2.22 tdelete F -GLIBC_2.22 tdestroy F -GLIBC_2.22 telldir F -GLIBC_2.22 tempnam F -GLIBC_2.22 textdomain F -GLIBC_2.22 tfind F -GLIBC_2.22 time F -GLIBC_2.22 timegm F -GLIBC_2.22 timelocal F -GLIBC_2.22 times F -GLIBC_2.22 timespec_get F -GLIBC_2.22 timezone D 0x4 -GLIBC_2.22 tmpfile F -GLIBC_2.22 tmpfile64 F -GLIBC_2.22 tmpnam F -GLIBC_2.22 tmpnam_r F -GLIBC_2.22 toascii F -GLIBC_2.22 tolower F -GLIBC_2.22 tolower_l F -GLIBC_2.22 toupper F -GLIBC_2.22 toupper_l F -GLIBC_2.22 towctrans F -GLIBC_2.22 towctrans_l F -GLIBC_2.22 towlower F -GLIBC_2.22 towlower_l F -GLIBC_2.22 towupper F -GLIBC_2.22 towupper_l F -GLIBC_2.22 tr_break F -GLIBC_2.22 truncate F -GLIBC_2.22 truncate64 F -GLIBC_2.22 tsearch F -GLIBC_2.22 ttyname F -GLIBC_2.22 ttyname_r F -GLIBC_2.22 ttyslot F -GLIBC_2.22 twalk F -GLIBC_2.22 tzname D 0x8 -GLIBC_2.22 tzset F -GLIBC_2.22 ualarm F -GLIBC_2.22 ulckpwdf F -GLIBC_2.22 ulimit F -GLIBC_2.22 umask F -GLIBC_2.22 uname F -GLIBC_2.22 ungetc F -GLIBC_2.22 ungetwc F -GLIBC_2.22 unlink F -GLIBC_2.22 unlinkat F -GLIBC_2.22 unlockpt F -GLIBC_2.22 unsetenv F -GLIBC_2.22 updwtmp F -GLIBC_2.22 updwtmpx F -GLIBC_2.22 uselocale F -GLIBC_2.22 usleep F -GLIBC_2.22 ustat F -GLIBC_2.22 utime F -GLIBC_2.22 utimensat F -GLIBC_2.22 utimes F -GLIBC_2.22 utmpname F -GLIBC_2.22 utmpxname F -GLIBC_2.22 valloc F -GLIBC_2.22 vasprintf F -GLIBC_2.22 vdprintf F -GLIBC_2.22 verr F -GLIBC_2.22 verrx F -GLIBC_2.22 versionsort F -GLIBC_2.22 versionsort64 F -GLIBC_2.22 vfork F -GLIBC_2.22 vfprintf F -GLIBC_2.22 vfscanf F -GLIBC_2.22 vfwprintf F -GLIBC_2.22 vfwscanf F -GLIBC_2.22 vhangup F -GLIBC_2.22 vlimit F -GLIBC_2.22 vprintf F -GLIBC_2.22 vscanf F -GLIBC_2.22 vsnprintf F -GLIBC_2.22 vsprintf F -GLIBC_2.22 vsscanf F -GLIBC_2.22 vswprintf F -GLIBC_2.22 vswscanf F -GLIBC_2.22 vsyslog F -GLIBC_2.22 vtimes F -GLIBC_2.22 vwarn F -GLIBC_2.22 vwarnx F -GLIBC_2.22 vwprintf F -GLIBC_2.22 vwscanf F -GLIBC_2.22 wait F -GLIBC_2.22 wait3 F -GLIBC_2.22 wait4 F -GLIBC_2.22 waitid F -GLIBC_2.22 waitpid F -GLIBC_2.22 warn F -GLIBC_2.22 warnx F -GLIBC_2.22 wcpcpy F -GLIBC_2.22 wcpncpy F -GLIBC_2.22 wcrtomb F -GLIBC_2.22 wcscasecmp F -GLIBC_2.22 wcscasecmp_l F -GLIBC_2.22 wcscat F -GLIBC_2.22 wcschr F -GLIBC_2.22 wcschrnul F -GLIBC_2.22 wcscmp F -GLIBC_2.22 wcscoll F -GLIBC_2.22 wcscoll_l F -GLIBC_2.22 wcscpy F -GLIBC_2.22 wcscspn F -GLIBC_2.22 wcsdup F -GLIBC_2.22 wcsftime F -GLIBC_2.22 wcsftime_l F -GLIBC_2.22 wcslen F -GLIBC_2.22 wcsncasecmp F -GLIBC_2.22 wcsncasecmp_l F -GLIBC_2.22 wcsncat F -GLIBC_2.22 wcsncmp F -GLIBC_2.22 wcsncpy F -GLIBC_2.22 wcsnlen F -GLIBC_2.22 wcsnrtombs F -GLIBC_2.22 wcspbrk F -GLIBC_2.22 wcsrchr F -GLIBC_2.22 wcsrtombs F -GLIBC_2.22 wcsspn F -GLIBC_2.22 wcsstr F -GLIBC_2.22 wcstod F -GLIBC_2.22 wcstod_l F -GLIBC_2.22 wcstof F -GLIBC_2.22 wcstof_l F -GLIBC_2.22 wcstoimax F -GLIBC_2.22 wcstok F -GLIBC_2.22 wcstol F -GLIBC_2.22 wcstol_l F -GLIBC_2.22 wcstold F -GLIBC_2.22 wcstold_l F -GLIBC_2.22 wcstoll F -GLIBC_2.22 wcstoll_l F -GLIBC_2.22 wcstombs F -GLIBC_2.22 wcstoq F -GLIBC_2.22 wcstoul F -GLIBC_2.22 wcstoul_l F -GLIBC_2.22 wcstoull F -GLIBC_2.22 wcstoull_l F -GLIBC_2.22 wcstoumax F -GLIBC_2.22 wcstouq F -GLIBC_2.22 wcswcs F -GLIBC_2.22 wcswidth F -GLIBC_2.22 wcsxfrm F -GLIBC_2.22 wcsxfrm_l F -GLIBC_2.22 wctob F -GLIBC_2.22 wctomb F -GLIBC_2.22 wctrans F -GLIBC_2.22 wctrans_l F -GLIBC_2.22 wctype F -GLIBC_2.22 wctype_l F -GLIBC_2.22 wcwidth F -GLIBC_2.22 wmemchr F -GLIBC_2.22 wmemcmp F -GLIBC_2.22 wmemcpy F -GLIBC_2.22 wmemmove F -GLIBC_2.22 wmempcpy F -GLIBC_2.22 wmemset F -GLIBC_2.22 wordexp F -GLIBC_2.22 wordfree F -GLIBC_2.22 wprintf F -GLIBC_2.22 write F -GLIBC_2.22 writev F -GLIBC_2.22 wscanf F diff --git a/sysdeps/arm/nacl/shlib-versions b/sysdeps/arm/nacl/shlib-versions deleted file mode 100644 index 9d94784282..0000000000 --- a/sysdeps/arm/nacl/shlib-versions +++ /dev/null @@ -1,4 +0,0 @@ -# Library=version Earliest symbol set (optional) -# --------------- ------------------------------ - -ld=ld-nacl-arm.so.1 diff --git a/sysdeps/arm/nacl/start.c b/sysdeps/arm/nacl/start.c deleted file mode 100644 index 25f6fd774a..0000000000 --- a/sysdeps/arm/nacl/start.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/nacl/start.c> diff --git a/sysdeps/arm/nacl/sysdep.h b/sysdeps/arm/nacl/sysdep.h deleted file mode 100644 index 98fb41f1d0..0000000000 --- a/sysdeps/arm/nacl/sysdep.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Assembler macros for ARM/NaCl. - Copyright (C) 2015-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _ARM_NACL_SYSDEP_H -#define _ARM_NACL_SYSDEP_H 1 - -#ifdef __ASSEMBLER__ - -# ifndef NO_THUMB -# define NO_THUMB -# endif -# define ARM_SFI_MACROS 1 - -/* The compiler driver primes the assembler with a standard set of - macros that includes sfi_breg and sfi_sp. The sfi_pld macro is - redundant with sfi_breg, but libc code uses it so as not to run - afoul of the assembler's parsing bug in versions prior to 2.23.2. - NaCl never uses an assembler that has this bug. */ - -.macro sfi_pld basereg, offset=#0 - sfi_breg \basereg, pld [\basereg, \offset] -.endm - -#endif - -#include <sysdeps/arm/sysdep.h> - -#ifdef __ASSEMBLER__ - -# undef eabi_fnstart -# define eabi_fnstart -# undef eabi_fnend -# define eabi_fnend -# undef eabi_save -# define eabi_save(...) -# undef eabi_cantunwind -# define eabi_cantunwind -# undef eabi_pad -# define eabi_pad(n) - -/* NaCl has its own special way of getting the thread pointer. */ -# undef GET_TLS -# define GET_TLS(tmp) ldr r0, [r9] - -/* Rather than macroizing the code any more, we can just define a few - mnemonics as macros here. */ -# define bl sfi_bl -# define bx sfi_bx -# define blx sfi_blx -# define bxeq sfi_bxeq /* Only condition now in use. */ - -#endif /* __ASSEMBLER__ */ - -#endif /* sysdep.h */ diff --git a/sysdeps/arm/nacl/tls.h b/sysdeps/arm/nacl/tls.h deleted file mode 100644 index 646e7a9d06..0000000000 --- a/sysdeps/arm/nacl/tls.h +++ /dev/null @@ -1,2 +0,0 @@ -#include <sysdeps/arm/nptl/tls.h> -#include <sysdeps/nacl/tls.h> diff --git a/sysdeps/arm/nofpu/Implies b/sysdeps/arm/nofpu/Implies new file mode 100644 index 0000000000..abcbadb25f --- /dev/null +++ b/sysdeps/arm/nofpu/Implies @@ -0,0 +1 @@ +ieee754/soft-fp diff --git a/sysdeps/arm/nptl/Makefile b/sysdeps/arm/nptl/Makefile index 5770217e47..d796f22aa6 100644 --- a/sysdeps/arm/nptl/Makefile +++ b/sysdeps/arm/nptl/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2005-2016 Free Software Foundation, Inc. +# Copyright (C) 2005-2018 Free Software Foundation, Inc. # This file is part of the GNU C Library. # # The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/nptl/bits/pthreadtypes-arch.h b/sysdeps/arm/nptl/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..1e8718f19c --- /dev/null +++ b/sysdeps/arm/nptl/bits/pthreadtypes-arch.h @@ -0,0 +1,71 @@ +/* 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 _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.h */ diff --git a/sysdeps/arm/nptl/bits/pthreadtypes.h b/sysdeps/arm/nptl/bits/pthreadtypes.h deleted file mode 100644 index afb5392c8f..0000000000 --- a/sysdeps/arm/nptl/bits/pthreadtypes.h +++ /dev/null @@ -1,189 +0,0 @@ -/* Copyright (C) 2002-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_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_COND_COMPAT_T 12 -#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 - - -/* Thread identifiers. The structure of the attribute type is not - exposed on purpose. */ -typedef unsigned long int pthread_t; - - -union pthread_attr_t -{ - char __size[__SIZEOF_PTHREAD_ATTR_T]; - long int __align; -}; -#ifndef __have_pthread_attr_t -typedef union pthread_attr_t pthread_attr_t; -# define __have_pthread_attr_t 1 -#endif - - -typedef struct __pthread_internal_slist -{ - struct __pthread_internal_slist *__next; -} __pthread_slist_t; - - -/* Data structures for mutex handling. The structure of the attribute - type is not exposed on purpose. */ -typedef union -{ - struct __pthread_mutex_s - { - int __lock; - unsigned int __count; - int __owner; - /* KIND must stay at this position in the structure to maintain - binary compatibility. */ - int __kind; - unsigned int __nusers; - __extension__ union - { - int __spins; - __pthread_slist_t __list; - }; - } __data; - char __size[__SIZEOF_PTHREAD_MUTEX_T]; - long int __align; -} pthread_mutex_t; - -/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ -#define __PTHREAD_SPINS 0 - -typedef union -{ - char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; - long int __align; -} pthread_mutexattr_t; - - -/* Data structure for conditional variable handling. The structure of - the attribute type is not exposed on purpose. */ -typedef union -{ - struct - { - int __lock; - unsigned int __futex; - __extension__ unsigned long long int __total_seq; - __extension__ unsigned long long int __wakeup_seq; - __extension__ unsigned long long int __woken_seq; - void *__mutex; - unsigned int __nwaiters; - unsigned int __broadcast_seq; - } __data; - char __size[__SIZEOF_PTHREAD_COND_T]; - __extension__ long long int __align; -} pthread_cond_t; - -typedef union -{ - char __size[__SIZEOF_PTHREAD_CONDATTR_T]; - long int __align; -} pthread_condattr_t; - - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#if defined __USE_UNIX98 || defined __USE_XOPEN2K -/* Data structure for read-write lock variable handling. The - structure of the attribute type is not exposed on purpose. */ -typedef union -{ - struct - { - int __lock; - unsigned int __nr_readers; - unsigned int __readers_wakeup; - unsigned int __writer_wakeup; - unsigned int __nr_readers_queued; - unsigned int __nr_writers_queued; -#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 __writer; - } __data; - char __size[__SIZEOF_PTHREAD_RWLOCK_T]; - long int __align; -} pthread_rwlock_t; - -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - -typedef union -{ - char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; - long int __align; -} pthread_rwlockattr_t; -#endif - - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - - -/* POSIX barriers data type. The structure of the type is - deliberately not exposed. */ -typedef union -{ - char __size[__SIZEOF_PTHREAD_BARRIER_T]; - long int __align; -} pthread_barrier_t; - -typedef union -{ - char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; - int __align; -} pthread_barrierattr_t; -#endif - - -#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/arm/nptl/bits/semaphore.h b/sysdeps/arm/nptl/bits/semaphore.h index f9498c8e75..1b38b6e81e 100644 --- a/sysdeps/arm/nptl/bits/semaphore.h +++ b/sysdeps/arm/nptl/bits/semaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2016 Free Software Foundation, Inc. +/* 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 diff --git a/sysdeps/arm/nptl/pthread-offsets.h b/sysdeps/arm/nptl/pthread-offsets.h new file mode 100644 index 0000000000..9617354dc7 --- /dev/null +++ b/sysdeps/arm/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/arm/nptl/pthreaddef.h b/sysdeps/arm/nptl/pthreaddef.h index 4e42a7f7df..f8d821d6f2 100644 --- a/sysdeps/arm/nptl/pthreaddef.h +++ b/sysdeps/arm/nptl/pthreaddef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2016 Free Software Foundation, Inc. +/* 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 diff --git a/sysdeps/arm/nptl/tcb-offsets.sym b/sysdeps/arm/nptl/tcb-offsets.sym index 92cc441d3d..bf9c0a1c17 100644 --- a/sysdeps/arm/nptl/tcb-offsets.sym +++ b/sysdeps/arm/nptl/tcb-offsets.sym @@ -7,5 +7,4 @@ #define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread)) MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) -PID_OFFSET thread_offsetof (pid) TID_OFFSET thread_offsetof (tid) diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index 0368f1a0ba..ca0352dafc 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/ARM version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,17 +25,7 @@ # include <stdbool.h> # include <stddef.h> # include <stdint.h> - -/* Type for the dtv. */ -typedef union dtv -{ - size_t counter; - struct - { - void *val; - bool is_static; - } pointer; -} dtv_t; +# include <dl-dtv.h> #else /* __ASSEMBLER__ */ # include <tcb-offsets.h> diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index 33e9501c4f..d803256d9f 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -52,4 +52,5 @@ $as_echo "$as_me: WARNING: arm/preconfigure: Did not find ARM architecture type; esac machine=arm/$machine + with_fp_cond="!defined __SOFTFP__" esac diff --git a/sysdeps/arm/preconfigure.ac b/sysdeps/arm/preconfigure.ac index 20de5bcfea..43d014031d 100644 --- a/sysdeps/arm/preconfigure.ac +++ b/sysdeps/arm/preconfigure.ac @@ -47,4 +47,5 @@ arm*) esac machine=arm/$machine + with_fp_cond="!defined __SOFTFP__" esac diff --git a/sysdeps/arm/s_fma.c b/sysdeps/arm/s_fma.c deleted file mode 100644 index dc4e27bfc1..0000000000 --- a/sysdeps/arm/s_fma.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifdef __SOFTFP__ -# include <soft-fp/fmadf4.c> -#else -# include <sysdeps/ieee754/dbl-64/s_fma.c> -#endif diff --git a/sysdeps/arm/s_fmaf.c b/sysdeps/arm/s_fmaf.c deleted file mode 100644 index 550d8b85d3..0000000000 --- a/sysdeps/arm/s_fmaf.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifdef __SOFTFP__ -# include <soft-fp/fmasf4.c> -#else -# include <sysdeps/ieee754/dbl-64/s_fmaf.c> -#endif diff --git a/sysdeps/arm/setfpucw.c b/sysdeps/arm/setfpucw.c index b44fc5f15d..4ae14a565d 100644 --- a/sysdeps/arm/setfpucw.c +++ b/sysdeps/arm/setfpucw.c @@ -1,5 +1,5 @@ /* Set the FPU control word. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S index 79d3dc37d2..dc8081abe6 100644 --- a/sysdeps/arm/setjmp.S +++ b/sysdeps/arm/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for ARM. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,20 +36,15 @@ ENTRY (__sigsetjmp) #ifdef PTR_MANGLE mov a4, sp PTR_MANGLE2 (a4, a4, a3) - sfi_breg ip, \ - str a4, [\B], #4 + str a4, [ip], #4 PTR_MANGLE2 (a4, lr, a3) - sfi_breg ip, \ - str a4, [\B], #4 + str a4, [ip], #4 #else - sfi_breg ip, \ - str sp, [\B], #4 - sfi_breg ip, \ - str lr, [\B], #4 + str sp, [ip], #4 + str lr, [ip], #4 #endif /* Save registers */ - sfi_breg ip, \ - stmia \B!, JMP_BUF_REGLIST + stmia ip!, JMP_BUF_REGLIST #if !defined ARM_ASSUME_NO_IWMMXT || defined __SOFTFP__ # define NEED_HWCAP 1 @@ -80,8 +75,7 @@ ENTRY (__sigsetjmp) Don't use VFP instructions directly because this code is used in non-VFP multilibs. */ /* Following instruction is vstmia ip!, {d8-d15}. */ - sfi_breg ip, \ - stc p11, cr8, [\B], #64 + stc p11, cr8, [ip], #64 .Lno_vfp: #ifndef ARM_ASSUME_NO_IWMMXT @@ -90,18 +84,12 @@ ENTRY (__sigsetjmp) /* Save the call-preserved iWMMXt registers. */ /* Following instructions are wstrd wr10, [ip], #8 (etc.) */ - sfi_breg r12, \ - stcl p1, cr10, [\B], #8 - sfi_breg r12, \ - stcl p1, cr11, [\B], #8 - sfi_breg r12, \ - stcl p1, cr12, [\B], #8 - sfi_breg r12, \ - stcl p1, cr13, [\B], #8 - sfi_breg r12, \ - stcl p1, cr14, [\B], #8 - sfi_breg r12, \ - stcl p1, cr15, [\B], #8 + stcl p1, cr10, [r12], #8 + stcl p1, cr11, [r12], #8 + stcl p1, cr12, [r12], #8 + stcl p1, cr13, [r12], #8 + stcl p1, cr14, [r12], #8 + stcl p1, cr15, [r12], #8 .Lno_iwmmxt: #endif diff --git a/sysdeps/arm/sotruss-lib.c b/sysdeps/arm/sotruss-lib.c index 01b056eef4..843ff9c2e0 100644 --- a/sysdeps/arm/sotruss-lib.c +++ b/sysdeps/arm/sotruss-lib.c @@ -1,5 +1,5 @@ /* Override generic sotruss-lib.c to define actual functions for ARM. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/stackinfo.h b/sysdeps/arm/stackinfo.h index 88bead9e24..4da1fffe84 100644 --- a/sysdeps/arm/stackinfo.h +++ b/sysdeps/arm/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2016 Free Software Foundation, Inc. +/* 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 diff --git a/sysdeps/arm/start.S b/sysdeps/arm/start.S index 077a8a6444..adef090717 100644 --- a/sysdeps/arm/start.S +++ b/sysdeps/arm/start.S @@ -1,5 +1,5 @@ /* Startup code for ARM & ELF - Copyright (C) 1995-2016 Free Software Foundation, Inc. + 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 @@ -89,7 +89,7 @@ _start: /* Push rtld_fini */ push { a1 } -#ifdef SHARED +#ifdef PIC ldr sl, .L_GOT adr a4, .L_GOT add sl, sl, a4 @@ -127,7 +127,7 @@ _start: /* should never get here....*/ bl abort -#ifdef SHARED +#ifdef PIC .align 2 .L_GOT: .word _GLOBAL_OFFSET_TABLE_ - .L_GOT diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S index 36c77c7dac..382d1d24f7 100644 --- a/sysdeps/arm/strlen.S +++ b/sysdeps/arm/strlen.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2016 Free Software Foundation, Inc. +/* Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Code contributed by Matthew Wilcox <willy@odie.barnet.ac.uk> @@ -30,8 +30,7 @@ ENTRY(strlen) bic r1, r0, $3 @ addr of word containing first byte - sfi_breg r1, \ - ldr r2, [\B], $4 @ get the first word + ldr r2, [r1], $4 @ get the first word ands r3, r0, $3 @ how many bytes are duff? rsb r0, r3, $0 @ get - that number into counter. beq Laligned @ skip into main check routine if no @@ -55,8 +54,7 @@ Laligned: @ here, we have a word in r2. Does it tstne r2, $0x00ff0000 @ tstne r2, $0xff000000 @ addne r0, r0, $4 @ if not, the string is 4 bytes longer - sfi_breg r1, \ - ldrne r2, [\B], $4 @ and we continue to the next word + ldrne r2, [r1], $4 @ and we continue to the next word bne Laligned @ Llastword: @ drop through to here once we find a #ifdef __ARMEB__ diff --git a/sysdeps/arm/submul_1.S b/sysdeps/arm/submul_1.S index b4a3c97945..e3c7f41b7f 100644 --- a/sysdeps/arm/submul_1.S +++ b/sysdeps/arm/submul_1.S @@ -1,5 +1,5 @@ /* mpn_submul_1 -- multiply and subtract bignums. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-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 @@ -37,24 +37,19 @@ ENTRY (__mpn_submul_1) cfi_rel_offset (r6, 8) cfi_rel_offset (r7, 12) - sfi_breg r1, \ - ldr r6, [\B], #4 - sfi_breg r0, \ - ldr r7, [\B] + ldr r6, [r1], #4 + ldr r7, [r0] mov r4, #0 /* init carry in */ b 1f 0: - sfi_breg r1, \ - ldr r6, [\B], #4 /* load next ul */ + ldr r6, [r1], #4 /* load next ul */ adds r5, r5, r4 /* (lpl, c) = lpl + cl */ adc r4, ip, #0 /* cl = hpl + c */ subs r5, r7, r5 /* (lpl, !c) = rl - lpl */ - sfi_breg r0, \ - ldr r7, [\B, #4] /* load next rl */ + ldr r7, [r0, #4] /* load next rl */ it cc addcc r4, r4, #1 /* cl += !c */ - sfi_breg r0, \ - str r5, [\B], #4 + str r5, [r0], #4 1: umull r5, ip, r6, r3 /* (hpl, lpl) = ul * vl */ subs r2, r2, #1 @@ -63,8 +58,7 @@ ENTRY (__mpn_submul_1) adds r5, r5, r4 /* (lpl, c) = lpl + cl */ adc r4, ip, #0 /* cl = hpl + c */ subs r5, r7, r5 /* (lpl, !c) = rl - lpl */ - sfi_breg r0, \ - str r5, [\B], #4 + str r5, [r0], #4 it cc addcc r4, r4, #1 /* cl += !c */ mov r0, r4 /* return carry */ diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h index 744cb538cf..ababe5a062 100644 --- a/sysdeps/arm/sys/ucontext.h +++ b/sysdeps/arm/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2016 Free Software Foundation, Inc. +/* Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,74 +21,90 @@ #define _SYS_UCONTEXT_H 1 #include <features.h> -#include <signal.h> + +#include <bits/types/sigset_t.h> +#include <bits/types/stack_t.h> + typedef int greg_t; /* Number of general registers. */ -#define NGREG 16 +#define __NGREG 16 +#ifdef __USE_MISC +# define NGREG __NGREG +#endif /* Container for all general registers. */ -typedef greg_t gregset_t[NGREG]; +typedef greg_t gregset_t[__NGREG]; +#ifdef __USE_MISC /* Number of each register is the `gregset_t' array. */ enum { R0 = 0, -#define R0 R0 +# define R0 R0 R1 = 1, -#define R1 R1 +# define R1 R1 R2 = 2, -#define R2 R2 +# define R2 R2 R3 = 3, -#define R3 R3 +# define R3 R3 R4 = 4, -#define R4 R4 +# define R4 R4 R5 = 5, -#define R5 R5 +# define R5 R5 R6 = 6, -#define R6 R6 +# define R6 R6 R7 = 7, -#define R7 R7 +# define R7 R7 R8 = 8, -#define R8 R8 +# define R8 R8 R9 = 9, -#define R9 R9 +# define R9 R9 R10 = 10, -#define R10 R10 +# define R10 R10 R11 = 11, -#define R11 R11 +# define R11 R11 R12 = 12, -#define R12 R12 +# define R12 R12 R13 = 13, -#define R13 R13 +# define R13 R13 R14 = 14, -#define R14 R14 +# define R14 R14 R15 = 15, -#define R15 R15 +# define R15 R15 }; +#endif + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif /* Structure to describe FPU registers. */ -typedef struct fpregset +typedef struct { } fpregset_t; /* Context to describe whole processor state. */ typedef struct { - gregset_t gregs; - fpregset_t fpregs; + gregset_t __ctx(gregs); + fpregset_t __ctx(fpregs); } mcontext_t; /* Userlevel context. */ -typedef struct ucontext +typedef struct ucontext_t { - unsigned long int uc_flags; - struct ucontext *uc_link; - __sigset_t uc_sigmask; + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; - long int uc_filler[5]; + long int __glibc_reserved1[5]; } ucontext_t; +#undef __ctx + #endif /* sys/ucontext.h */ diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h index 29008b4ba0..21673feea2 100644 --- a/sysdeps/arm/sysdep.h +++ b/sysdeps/arm/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for ARM. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -150,7 +150,6 @@ second version uses it. */ # define LDST_INDEXED_NOINDEX(OP, R, T, X, Y) \ add T, X, Y; \ - sfi_breg T, \ OP R, [T] # define LDST_INDEXED_INDEX(OP, R, X, Y) \ OP R, [X, Y] @@ -198,7 +197,7 @@ # define LDR_GLOBAL(R, T, SYMBOL, CONSTANT) \ movw T, #:lower16:SYMBOL; \ movt T, #:upper16:SYMBOL; \ - sfi_breg T, ldr R, [\B, $CONSTANT] + ldr R, [T, $CONSTANT] # elif defined (ARCH_HAS_T2) && defined (PIC) && ARM_PCREL_MOVW_OK # define LDR_GLOBAL(R, T, SYMBOL, CONSTANT) \ movw R, #:lower16:_GLOBAL_OFFSET_TABLE_ - 97f - PC_OFS; \ @@ -212,7 +211,7 @@ 97: add R, R, pc; \ 98: LDST_PC_INDEXED (ldr, T, T, T); \ LDST_INDEXED (ldr, R, T, R, T); \ - sfi_breg R, ldr R, [\B, $CONSTANT] + ldr R, [R, $CONSTANT] # else # define LDR_GLOBAL(R, T, SYMBOL, CONSTANT) \ ldr T, 99f; \ @@ -277,53 +276,6 @@ cfi_restore_state # endif /* ARCH_HAS_HARD_TP */ -# ifndef ARM_SFI_MACROS -# define ARM_SFI_MACROS 1 -/* This assembly macro is prepended to any load/store instruction, - pulling the base register out of the addressing mode syntax and - making it the first operand of the macro. For example: - ldr r0, [r1] - becomes: - sfi_breg r1, ldr r0, [\B] - The \B stands in for the base register that is the first operand - to the macro, so we can avoid error-prone repetition of the base - register in two places on the line. - - This is used for all memory access through a base register other - than PC or SP. It's intended to support SFI schemes such as - Native Client, where the OS will enforce that all load/store - instructions use a special form. In any such configuration, - another sysdep.h file will have defined ARM_SFI_MACROS and - provided its own assembly macros with the same interface. */ - - .macro sfi_breg basereg, insn, operands:vararg - .macro _sfi_breg_doit B - \insn \operands - .endm - _sfi_breg_doit \basereg - .purgem _sfi_breg_doit - .endm - -/* This assembly macro replaces the "pld" instruction. - The syntax: - sfi_pld REGISTER, #OFFSET - is exactly equivalent to: - sfi_breg REGISTER, pld [\B, #OFFSET] - (and ", #OFFSET" is optional). We have a separate macro - only to work around a bug in GAS versions prior to 2.23.2, - that misparses the sfi_breg macro expansion in this case. */ - - .macro sfi_pld basereg, offset=#0 - pld [\basereg, \offset] - .endm - -/* This macro precedes any instruction that directly changes the SP. - It's not needed for push/pop or for any kind of load or store that - implicitly changes the SP via the ! syntax. */ -# define sfi_sp /* Nothing to do. */ - -# endif - /* These are the directives used for EABI unwind info. Wrap them in macros so another configuration's sysdep.h file can define them away if it doesn't use EABI unwind info. */ diff --git a/sysdeps/arm/tlsdesc.c b/sysdeps/arm/tlsdesc.c index 3f6f132647..d142d7a2c9 100644 --- a/sysdeps/arm/tlsdesc.c +++ b/sysdeps/arm/tlsdesc.c @@ -1,5 +1,5 @@ /* Manage TLS descriptors. ARM version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,135 +16,17 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ -#include <link.h> #include <ldsodefs.h> -#include <elf/dynamic-link.h> #include <tls.h> #include <dl-tlsdesc.h> #include <dl-unmap-segments.h> +#define _dl_tlsdesc_resolve_hold 0 #include <tlsdeschtab.h> -/* This function is used to lazily resolve TLS_DESC REL relocations - Besides the TLS descriptor itself, we get the module's got address - as the second parameter. */ - -void -attribute_hidden -_dl_tlsdesc_lazy_resolver_fixup (struct tlsdesc volatile *td, - Elf32_Addr *got) -{ - struct link_map *l = (struct link_map *)got[1]; - lookup_t result; - unsigned long value; - - if (_dl_tlsdesc_resolve_early_return_p - (td, (void*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_PLT)]) + l->l_addr))) - return; - - if (td->argument.value & 0x80000000) - { - /* A global symbol, this is the symbol index. */ - /* The code below was borrowed from _dl_fixup(). */ - const Elf_Symndx symndx = td->argument.value ^ 0x80000000; - const ElfW(Sym) *const symtab - = (const void *) D_PTR (l, l_info[DT_SYMTAB]); - const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); - const ElfW(Sym) *sym = &symtab[symndx]; - - /* Look up the target symbol. If the normal lookup rules are not - used don't look in the global scope. */ - if (ELFW(ST_BIND) (sym->st_info) != STB_LOCAL - && __builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) - { - const struct r_found_version *version = NULL; - - if (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL) - { - const ElfW(Half) *vernum = - (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); - ElfW(Half) ndx = vernum[symndx] & 0x7fff; - version = &l->l_versions[ndx]; - if (version->hash == 0) - version = NULL; - } - - result = _dl_lookup_symbol_x - (strtab + sym->st_name, l, &sym, - l->l_scope, version, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); - if (sym) - value = sym->st_value; - else - { - td->entry = _dl_tlsdesc_undefweak; - goto done; - } - } - else - { - /* We already found the symbol. The module (and therefore its load - address) is also known. */ - result = l; - value = sym->st_value; - } - } - else - { - /* A local symbol, this is the offset within our tls section. - */ - value = td->argument.value; - result = l; - } - -#ifndef SHARED - CHECK_STATIC_TLS (l, result); -#else - if (!TRY_STATIC_TLS (l, result)) - { - td->argument.pointer = _dl_make_tlsdesc_dynamic (result, value); - td->entry = _dl_tlsdesc_dynamic; - } - else -#endif - { - td->argument.value = value + result->l_tls_offset; - td->entry = _dl_tlsdesc_return; - } - - done: - _dl_tlsdesc_wake_up_held_fixups (); -} - -/* This function is used to avoid busy waiting for other threads to - complete the lazy relocation. Once another thread wins the race to - relocate a TLS descriptor, it sets the descriptor up such that this - function is called to wait until the resolver releases the - lock. */ - -void -attribute_hidden -_dl_tlsdesc_resolve_hold_fixup (struct tlsdesc volatile *td, - void *caller) -{ - /* Maybe we're lucky and can return early. */ - if (caller != td->entry) - return; - - /* Locking here will stop execution until the running resolver runs - _dl_tlsdesc_wake_up_held_fixups(), releasing the lock. - - FIXME: We'd be better off waiting on a condition variable, such - that we didn't have to hold the lock throughout the relocation - processing. */ - __rtld_lock_lock_recursive (GL(dl_load_lock)); - __rtld_lock_unlock_recursive (GL(dl_load_lock)); -} - /* Unmap the dynamic object, but also release its TLS descriptor table if there is one. */ void -internal_function _dl_unmap (struct link_map *map) { _dl_unmap_segments (map); diff --git a/sysdeps/arm/tst-armtlsdescloc.c b/sysdeps/arm/tst-armtlsdescloc.c index ba4834a5ce..11324306b6 100644 --- a/sysdeps/arm/tst-armtlsdescloc.c +++ b/sysdeps/arm/tst-armtlsdescloc.c @@ -1,5 +1,5 @@ /* ARM immediate binding GNU TLS descriptor relocation test. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/tst-armtlsdesclocmod.c b/sysdeps/arm/tst-armtlsdesclocmod.c index d923e2945d..f5e3104911 100644 --- a/sysdeps/arm/tst-armtlsdesclocmod.c +++ b/sysdeps/arm/tst-armtlsdesclocmod.c @@ -1,5 +1,5 @@ /* DSO used for ARM immediate binding GNU TLS descriptor relocation test. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/tst-audit.h b/sysdeps/arm/tst-audit.h index c0afe39cd8..b501211da5 100644 --- a/sysdeps/arm/tst-audit.h +++ b/sysdeps/arm/tst-audit.h @@ -1,6 +1,6 @@ /* Definitions for testing PLT entry/exit auditing. ARM version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/arm/unwind-dw2-fde-glibc.c b/sysdeps/arm/unwind-dw2-fde-glibc.c index ef76c05396..8e0751fc29 100644 --- a/sysdeps/arm/unwind-dw2-fde-glibc.c +++ b/sysdeps/arm/unwind-dw2-fde-glibc.c @@ -1,5 +1,5 @@ /* Dummy exception handling and frame unwind runtime interface routines. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/arm/unwind-resume.h b/sysdeps/arm/unwind-resume.h index 736cc835a8..ab7683c53f 100644 --- a/sysdeps/arm/unwind-resume.h +++ b/sysdeps/arm/unwind-resume.h @@ -1,5 +1,5 @@ /* Definitions for unwind-resume.c. ARM (EABI) version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/arm/unwind.h b/sysdeps/arm/unwind.h index 6e32b3ac99..a856b97501 100644 --- a/sysdeps/arm/unwind.h +++ b/sysdeps/arm/unwind.h @@ -1,5 +1,5 @@ /* Header file for the ARM EABI unwinder - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. Contributed by Paul Brook This file is free software; you can redistribute it and/or modify it |