diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-12-25 10:39:27 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-12-25 10:39:27 +0000 |
commit | 105320fa7b3665877cb3c50c821d10cf7ce154d0 (patch) | |
tree | 1b9b6f46b453cf110c6df3493e977b4468af25f6 /libc/ports/sysdeps | |
parent | 94c459cc7a611211d10773eef526826a8da80456 (diff) |
Merge changes between r21911 and r22029 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@22061 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/ports/sysdeps')
-rw-r--r-- | libc/ports/sysdeps/aarch64/dl-machine.h | 8 | ||||
-rw-r--r-- | libc/ports/sysdeps/aarch64/libm-test-ulps | 26 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/Makefile | 2 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/fpu/math_private.h | 3 | ||||
-rw-r--r-- | libc/ports/sysdeps/mips/fpu_control.h | 7 | ||||
-rw-r--r-- | libc/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c | 3 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/aarch64/ldconfig.h | 4 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/aarch64/mmap.c | 2 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/aarch64/readelflib.c | 18 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h | 3 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h | 29 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/arm/ldconfig.h | 25 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/arm/readelflib.c | 73 | ||||
-rw-r--r-- | libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S | 3 |
14 files changed, 185 insertions, 21 deletions
diff --git a/libc/ports/sysdeps/aarch64/dl-machine.h b/libc/ports/sysdeps/aarch64/dl-machine.h index 324115d27..94f1108e1 100644 --- a/libc/ports/sysdeps/aarch64/dl-machine.h +++ b/libc/ports/sysdeps/aarch64/dl-machine.h @@ -320,18 +320,12 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, case R_AARCH64_TLS_DTPREL64: if (sym) - { - const char *strtab; - strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); - *reloc_addr = sym->st_value + reloc->r_addend; - } + *reloc_addr = sym->st_value + reloc->r_addend; break; case R_AARCH64_TLS_TPREL64: if (sym) { - const char *strtab; - strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); CHECK_STATIC_TLS (map, sym_map); *reloc_addr = sym->st_value + reloc->r_addend + sym_map->l_tls_offset; diff --git a/libc/ports/sysdeps/aarch64/libm-test-ulps b/libc/ports/sysdeps/aarch64/libm-test-ulps index 68e705ae1..eda0e77f8 100644 --- a/libc/ports/sysdeps/aarch64/libm-test-ulps +++ b/libc/ports/sysdeps/aarch64/libm-test-ulps @@ -2492,9 +2492,33 @@ ildouble: 1 ldouble: 1 # pow +Test "pow (0x0.fffffffffffff8p0, -0x1.23456789abcdfp62) == 9.8826311568054561811190162420900667121992e+252": +ildouble: 1 +ldouble: 1 +Test "pow (0x0.ffffffp0, -0x1p24) == 2.7182819094701610539628664526874952929416": +ildouble: 1 +ldouble: 1 Test "pow (0x0.ffffffp0, 0x1p24) == 0.3678794302077803437135155590023422899744": float: 1 ifloat: 1 +Test "pow (10.0, -4930.0) == 1e-4930": +ildouble: 1 +ldouble: 1 +Test "pow (10.0, 4929.0) == 1e4929": +ildouble: 1 +ldouble: 1 +Test "pow (10.0, 4930.0) == 1e4930": +ildouble: 1 +ldouble: 1 +Test "pow (10.0, 4931.0) == 1e4931": +ildouble: 1 +ldouble: 1 +Test "pow (10.0, 4932.0) == 1e4932": +ildouble: 1 +ldouble: 1 +Test "pow (1e4932, 0.75) == 1e3699": +ildouble: 1 +ldouble: 1 # pow_downward Test "pow_downward (1.5, 1.03125) == 1.519127098714743184071644334163037684948": @@ -3583,6 +3607,8 @@ ldouble: 1 Function: "pow": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "pow_downward": float: 1 diff --git a/libc/ports/sysdeps/alpha/Makefile b/libc/ports/sysdeps/alpha/Makefile index 1a80db8dc..4387cb719 100644 --- a/libc/ports/sysdeps/alpha/Makefile +++ b/libc/ports/sysdeps/alpha/Makefile @@ -43,6 +43,8 @@ CFLAGS-s_fma.c = -mieee-with-inexact CFLAGS-s_fmaf.c = -mieee-with-inexact # This test tries to check for inexact being raised by arithmetic. CFLAGS-test-misc.c += -mieee-with-inexact +# Avoid "conflicting types for built-in function" warnings +CFLAGS-s_isnan.c += -fno-builtin-isnanf endif # Build everything with full IEEE math support, and with dynamic rounding; diff --git a/libc/ports/sysdeps/alpha/fpu/math_private.h b/libc/ports/sysdeps/alpha/fpu/math_private.h index 4f270f7a3..22ab3b9ab 100644 --- a/libc/ports/sysdeps/alpha/fpu/math_private.h +++ b/libc/ports/sysdeps/alpha/fpu/math_private.h @@ -12,9 +12,6 @@ #ifndef __isnanf # define __isnanf __isnanf #endif -#ifndef __isnanl -# define __isnanl __isnanl -#endif #include_next <math_private.h> diff --git a/libc/ports/sysdeps/mips/fpu_control.h b/libc/ports/sysdeps/mips/fpu_control.h index 7307d030e..acf794cb9 100644 --- a/libc/ports/sysdeps/mips/fpu_control.h +++ b/libc/ports/sysdeps/mips/fpu_control.h @@ -1,6 +1,5 @@ /* FPU control word bits. Mips version. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2008 - Free Software Foundation, Inc. + Copyright (C) 1996-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe and Ralf Baechle. @@ -63,8 +62,8 @@ #define _FPU_RESERVED 0xffffffff #define _FPU_DEFAULT 0x00000000 typedef unsigned int fpu_control_t; -#define _FPU_GETCW(cw) 0 -#define _FPU_SETCW(cw) do { } while (0) +#define _FPU_GETCW(cw) (cw) = 0 +#define _FPU_SETCW(cw) (void) (cw) extern fpu_control_t __fpu_control; #else /* __mips_soft_float */ diff --git a/libc/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c b/libc/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c index 36b9b7698..6b00ee0dc 100644 --- a/libc/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c +++ b/libc/ports/sysdeps/powerpc/nofpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions (soft-float edition). - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002. This file is part of the GNU C Library. @@ -21,6 +21,7 @@ #include "soft-supp.h" #include <bp-sym.h> +int __fegetexceptflag (fexcept_t *flagp, int excepts) { *flagp = (fexcept_t) __sim_exceptions & excepts & FE_ALL_EXCEPT; diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/ldconfig.h b/libc/ports/sysdeps/unix/sysv/linux/aarch64/ldconfig.h index 4c1af066f..d0517d8f8 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/ldconfig.h +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/ldconfig.h @@ -19,7 +19,9 @@ #include <sysdeps/generic/ldconfig.h> #define SYSDEP_KNOWN_INTERPRETER_NAMES \ - { "/lib/ld-linux-aarch64.so.1", FLAG_ELF_LIBC6 }, + { "/lib/ld-linux-aarch64.so.1", FLAG_ELF_LIBC6 }, \ + { "/lib/ld-linux.so.3", FLAG_ELF_LIBC6 }, \ + { "/lib/ld-linux-armhf.so.3", FLAG_ELF_LIBC6 }, #define SYSDEP_KNOWN_LIBRARY_NAMES \ { "libc.so.6", FLAG_ELF_LIBC6 }, \ { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/mmap.c b/libc/ports/sysdeps/unix/sysv/linux/aarch64/mmap.c index 14f3f6c6a..05df25cd3 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/mmap.c +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/mmap.c @@ -26,7 +26,7 @@ __ptr_t __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) { - return INLINE_SYSCALL (mmap, 6, addr, len, prot, flags, fd, offset); + return (__ptr_t) INLINE_SYSCALL (mmap, 6, addr, len, prot, flags, fd, offset); } weak_alias (__mmap, mmap) diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/readelflib.c b/libc/ports/sysdeps/unix/sysv/linux/aarch64/readelflib.c new file mode 100644 index 000000000..87994a4ea --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/readelflib.c @@ -0,0 +1,18 @@ +/* Copyright (C) 2012 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 "../arm/readelflib.c" diff --git a/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 62871d4fe..2263d3d79 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/libc/ports/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -208,12 +208,10 @@ __local_syscall_error: \ __label__ out; \ __label__ iserr; \ long sc_ret; \ - long sc_err; \ INTERNAL_SYSCALL_DECL (sc_err); \ \ if (__vdso_##name != NULL) \ { \ - register long _x0 asm ("x0"); \ sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, sc_err, nr, ##args); \ if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ goto out; \ @@ -244,7 +242,6 @@ __local_syscall_error: \ \ if (__vdso_##name != NULL) \ { \ - register long _x0 asm ("x0"); \ v_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, nr, ##args); \ if (!INTERNAL_SYSCALL_ERROR_P (v_ret, err) \ || INTERNAL_SYSCALL_ERRNO (v_ret, err) != ENOSYS) \ diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h b/libc/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h new file mode 100644 index 000000000..525caa2cb --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h @@ -0,0 +1,29 @@ +/* Support for reading /etc/ld.so.cache files written by Linux ldconfig. + Copyright (C) 2003-2012 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 <ldconfig.h> + +#ifdef __ARM_PCS_VFP +# define _dl_cache_check_flags(flags) \ + ((flags) == (FLAG_ARM_LIBHF | FLAG_ELF_LIBC6)) +#else +# define _dl_cache_check_flags(flags) \ + ((flags) == FLAG_ELF_LIBC6) +#endif + +#include_next <dl-cache.h> diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/ldconfig.h b/libc/ports/sysdeps/unix/sysv/linux/arm/ldconfig.h new file mode 100644 index 000000000..bb20b79db --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/ldconfig.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2001-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdeps/generic/ldconfig.h> + +#define SYSDEP_KNOWN_INTERPRETER_NAMES \ + { "/lib/ld-linux.so.3", FLAG_ELF_LIBC6 }, \ + { "/lib/ld-linux-armhf.so.3", FLAG_ELF_LIBC6 }, +#define SYSDEP_KNOWN_LIBRARY_NAMES \ + { "libc.so.6", FLAG_ELF_LIBC6 }, \ + { "libm.so.6", FLAG_ELF_LIBC6 }, diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/readelflib.c b/libc/ports/sysdeps/unix/sysv/linux/arm/readelflib.c new file mode 100644 index 000000000..e767f9e78 --- /dev/null +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/readelflib.c @@ -0,0 +1,73 @@ +/* Copyright (C) 1999-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger <aj@suse.de>, 1999 and + Jakub Jelinek <jakub@redhat.com>, 1999. + + 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/>. */ + + +int process_elf32_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, + void *file_contents, size_t file_length); +int process_elf64_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, + void *file_contents, size_t file_length); + +/* Returns 0 if everything is ok, != 0 in case of error. */ +int +process_elf_file (const char *file_name, const char *lib, int *flag, + unsigned int *osversion, char **soname, void *file_contents, + size_t file_length) +{ + ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents; + int ret; + + if (elf_header->e_ident [EI_CLASS] == ELFCLASS32) + { + Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header; + + ret = process_elf32_file (file_name, lib, flag, osversion, soname, + file_contents, file_length); + + if (!ret && EF_ARM_EABI_VERSION (elf32_header->e_flags) == EF_ARM_EABI_VER5) + { + if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_HARD) + *flag = FLAG_ARM_LIBHF|FLAG_ELF_LIBC6; + else if (elf32_header->e_flags & EF_ARM_ABI_FLOAT_SOFT) + *flag = FLAG_ELF_LIBC6; + } + } + else + { + ret = process_elf64_file (file_name, lib, flag, osversion, soname, + file_contents, file_length); + /* AArch64 libraries are always libc.so.6+. */ + if (!ret) + *flag = FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6; + } + return ret; +} + +#undef __ELF_NATIVE_CLASS +#undef process_elf_file +#define process_elf_file process_elf32_file +#define __ELF_NATIVE_CLASS 32 +#include "elf/readelflib.c" + +#undef __ELF_NATIVE_CLASS +#undef process_elf_file +#define process_elf_file process_elf64_file +#define __ELF_NATIVE_CLASS 64 +#include "elf/readelflib.c" diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S b/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S index de4fa136d..27592cc82 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S @@ -160,6 +160,8 @@ ENTRY (__clone) r32: the user function pointer */ .Lthread_start: + cfi_def_cfa_offset (FRAME_SIZE) + cfi_undefined (lr) /* Check and see if we need to reset the PID, which we do if CLONE_THREAD isn't set, i.e. we're not staying in the thread group. If CLONE_VM is set, we're doing some kind of thread-like clone, @@ -167,7 +169,6 @@ ENTRY (__clone) in getpid(). Otherwise (if CLONE_VM isn't set), it's a fork-like clone, and we go ahead and write the cached values from the true system pid (retrieved via __NR_getpid syscall). */ - cfi_def_cfa_offset (FRAME_SIZE) #ifdef __tilegx__ { moveli r0, hw1_last(CLONE_VM) |