git-updates
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 9 Mar 2018 20:48:04 +0000 (20:48 +0000)
GIT update of https://sourceware.org/git/glibc.git/release/2.27/master from glibc-2.27

Gbp-Pq: Name git-updates.diff

16 files changed:
ChangeLog
NEWS
posix/tst-glob_lstat_compat.c
sysdeps/powerpc/powerpc32/sysdep.h
sysdeps/powerpc/sysdep.h
sysdeps/sh/libm-test-ulps
sysdeps/sparc/sparc32/start.S
sysdeps/sparc/sparc64/start.S
sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
sysdeps/unix/sysv/linux/bits/mman-shared.h
sysdeps/unix/sysv/linux/powerpc/elision-lock.c
sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
sysdeps/unix/sysv/linux/riscv/readelflib.c
sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S
time/time.h

index f3fe2716b2847c85e524a644897e2cbe438d7fe0..3ae0ecd07a3edfa44be5c990e8b6c901f9eeaa8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,79 @@
+2018-03-09  Aurelien Jarno  <aurelien@aurel32.net>
+
+       [BZ #22919]
+       * sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S (__startcontext):
+       Add nop before __startcontext, add explaining comments.
+
+2018-03-07  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       [BZ #22926]
+       * sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION_IMPL): Define
+       empty for __SPE__.
+       * sysdeps/powerpc/sysdep.h (ABORT_TRANSACTION): Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/elision-lock.c (__lll_lock_elision):
+       Do not build hardware transactional code for __SPE__.
+       * sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
+       (__lll_trylock_elision): Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
+       (__lll_unlock_elision): Likewise.
+
+2018-02-19  Rical Jasan  <ricaljasan@pacific.net>
+
+       [BZ #6889]
+       * manual/filesys.texi (get_current_dir_name): Clarify behaviour.
+
+2018-02-16  Rical Jasan  <ricaljasan@pacific.net>
+
+       * manual/platform.texi (__riscv_flush_icache): Fix @deftypefun
+       syntax.
+
+2018-02-09  Rical Jasan  <ricaljasan@pacific.net>
+
+       * manual/creature.texi: Convert references to gcc.info to gcc.
+       * manual/stdio.texi: Likewise.
+       * manual/string.texi: Likewise.
+
+2018-02-18  Aurelien Jarno  <aurelien@aurel32.net>
+
+       [BZ #22818]
+       * posix/tst-glob_lstat_compat.c [__alpha__] (glob): Access
+       the GLIBC_2.1 version.
+
+2018-02-02  Sean McKean  <smckean83@gmail.com>
+
+       [BZ #22735]
+       * time/time.h (clock): Reference CLOCKS_PER_SEC in comment.
+
+2018-02-10  Dmitry V. Levin  <ldv@altlinux.org>
+
+       [BZ #22433]
+       * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (__ptrace_request):
+       Remove arm-specific PTRACE_GET_THREAD_AREA, PTRACE_GETHBPREGS,
+       and PTRACE_SETHBPREGS.
+
+2018-02-14  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       * sysdeps/sh/libm-test-ulps: Update.
+
+2018-02-09  DJ Delorie  <dj@redhat.com>
+
+       [BZ #22827]
+       * sysdeps/unix/sysv/linux/riscv/readelflib.c (process_elf_file): Use
+       64-bit ELF type for 64-bit ELF objects.
+
+2018-02-07  Igor Gnatenko  <ignatenko@redhat.com>
+
+       [BZ #22797]
+       * sysdeps/unix/sysv/linux/bits/mman-shared.h (pkey_get): Add
+       missing second underscore to parameter name.
+
+2018-02-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #22638]
+       * sysdeps/sparc/sparc32/start.S (_start): Check PIC instead of
+       SHARED.
+       * sysdeps/sparc/sparc64/start.S (_start): Likewise.
+
 2018-02-01  Dmitry V. Levin  <ldv@altlinux.org>
 
        * version.h (RELEASE): Set to "stable".
 2018-01-18  Arjun Shankar  <arjun@redhat.com>
 
        [BZ #22343]
+       [BZ #22774]
        CVE-2018-6485
+       CVE-2018-6551
        * malloc/malloc.c (checked_request2size): call REQUEST_OUT_OF_RANGE
        after padding.
        (_int_memalign): check for integer overflow before calling
diff --git a/NEWS b/NEWS
index a71c1038a86aa484b52c46400e8521df58e784db..5571c592bf1110c79432fb455caeb018d07f1f68 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,19 @@ See the end for copying conditions.
 
 Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
 using `glibc' in the "product" field.
+\f
+Version 2.27.1
+
+The following bugs are resolved with this release:
+
+  [6889] 'PWD' mentioned but not specified
+  [22638] sparc: static binaries are broken if glibc is built by gcc
+    configured with --enable-default-pie
+  [22735] Misleading typo in time.h source comment regarding CLOCKS_PER_SECOND
+  [22797] Linux: use reserved name __key in pkey_get
+  [22818] posix/tst-glob_lstat_compat failure on alpha
+  [22827] RISC-V ELF64 parser mis-reads flag in ldconfig
+
 \f
 Version 2.27
 
@@ -262,6 +275,10 @@ Security related changes:
   an object size near the value of SIZE_MAX, would return a pointer to a
   buffer which is too small, instead of NULL.  Reported by Jakub Wilk.
 
+  CVE-2018-6551: The malloc function, when called with an object size near
+  the value of SIZE_MAX, would return a pointer to a buffer which is too
+  small, instead of NULL.
+
 The following bugs are resolved with this release:
 
   [866] glob: glob should match dangling symlinks
index c46bc9e57834863d04ef74da495bdfe6bf2b149c..22cd1f02f96d5d118c3750cae96932b9f127daeb 100644 (file)
 #if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_27)
 
 __typeof (glob) glob;
+/* On alpha glob exists in version GLIBC_2_0, GLIBC_2_1, and GLIBC_2_27.
+   This test needs to access the version prior to GLIBC_2_27, which is
+   GLIBC_2_1 on alpha, GLIBC_2_0 elsewhere.  */
+# ifdef __alpha__
+compat_symbol_reference (libc, glob, glob, GLIBC_2_1);
+# else
 compat_symbol_reference (libc, glob, glob, GLIBC_2_0);
+# endif
 
 /* Compat glob should not call gl_lstat since for some old binaries it
    might be unitialized (for instance GNUmake).  Check if it is indeed
index 8e32a2a1312c72274fbcc46a32deb73cc7316d28..5f1294ead3071db9f787049ef0960e8221d469ff 100644 (file)
@@ -90,7 +90,7 @@ GOT_LABEL:                    ;                                             \
   cfi_endproc;                                                               \
   ASM_SIZE_DIRECTIVE(name)
 
-#if ! IS_IN(rtld)
+#if !IS_IN(rtld) && !defined(__SPE__)
 # define ABORT_TRANSACTION_IMPL \
     cmpwi    2,0;              \
     beq      1f;               \
index 03db75fcb745b684632c7a5de313ad10673d0bba..8a6d236caa44856824d5dcecaf1f984a45e1cbcc 100644 (file)
    we abort transaction just before syscalls.
 
    [1] Documentation/powerpc/transactional_memory.txt [Syscalls]  */
-#if !IS_IN(rtld)
+#if !IS_IN(rtld) && !defined(__SPE__)
 # define ABORT_TRANSACTION \
   ({                                           \
     if (THREAD_GET_TM_CAPABLE ())              \
index da4224c2d631a304ee441b543584724f6e5d404f..11c5f3216dbe4444ac075812e6c8f070c0d984f2 100644 (file)
@@ -1,13 +1,31 @@
 # Begin of automatic generation
 
 # Maximal error of functions:
-Function: "acos_towardzero":
+Function: "acos":
 float: 1
 ifloat: 1
 
-Function: "acosh":
+Function: "acos_towardzero":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
+
+Function: "acosh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "acosh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "asin":
+float: 1
+ifloat: 1
 
 Function: "asin_towardzero":
 double: 1
@@ -18,16 +36,55 @@ ifloat: 1
 Function: "asinh":
 double: 1
 float: 1
+idouble: 1
+ifloat: 1
+
+Function: "asinh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "atan":
+float: 1
 ifloat: 1
 
 Function: "atan2":
 float: 1
 ifloat: 1
 
-Function: "atanh":
+Function: "atan2_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atan_towardzero":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 
+Function: "atanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "atanh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "cabs":
+double: 1
+idouble: 1
+
+Function: "cabs_towardzero":
+double: 1
+idouble: 1
+
 Function: Real part of "cacos":
 double: 1
 float: 2
@@ -35,18 +92,52 @@ 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_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: Imaginary part of "cacos_towardzero":
+double: 4
+float: 2
+idouble: 4
 ifloat: 2
 
 Function: Real part of "cacosh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "cacosh":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
 
-Function: Imaginary part of "cacosh":
+Function: Real part of "cacosh_towardzero":
+double: 4
+float: 2
+idouble: 4
+ifloat: 2
+
+Function: Imaginary part of "cacosh_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "carg":
+float: 1
+ifloat: 1
+
+Function: "carg_towardzero":
 double: 1
 float: 2
 idouble: 1
@@ -59,15 +150,27 @@ 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_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: Imaginary part of "casin_towardzero":
+double: 4
+float: 2
+idouble: 4
 ifloat: 2
 
 Function: Real part of "casinh":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 
 Function: Imaginary part of "casinh":
@@ -76,8 +179,22 @@ float: 1
 idouble: 1
 ifloat: 1
 
+Function: Real part of "casinh_towardzero":
+double: 4
+float: 2
+idouble: 4
+ifloat: 2
+
+Function: Imaginary part of "casinh_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
 Function: Real part of "catan":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 
 Function: Imaginary part of "catan":
@@ -86,6 +203,18 @@ float: 1
 idouble: 1
 ifloat: 1
 
+Function: Real part of "catan_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "catan_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
 Function: Real part of "catanh":
 double: 1
 float: 1
@@ -93,13 +222,33 @@ idouble: 1
 ifloat: 1
 
 Function: Imaginary part of "catanh":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 
-Function: "cbrt":
+Function: Real part of "catanh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "catanh_towardzero":
 double: 1
-float: 1
+float: 2
 idouble: 1
+ifloat: 2
+
+Function: "cbrt":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
+Function: "cbrt_towardzero":
+double: 3
+float: 1
+idouble: 3
 ifloat: 1
 
 Function: Real part of "ccos":
@@ -114,6 +263,18 @@ float: 1
 idouble: 1
 ifloat: 1
 
+Function: Real part of "ccos_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ccos_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
 Function: Real part of "ccosh":
 double: 1
 float: 1
@@ -126,6 +287,18 @@ float: 1
 idouble: 1
 ifloat: 1
 
+Function: Real part of "ccosh_towardzero":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Imaginary part of "ccosh_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
 Function: Real part of "cexp":
 double: 2
 float: 1
@@ -138,27 +311,63 @@ float: 2
 idouble: 1
 ifloat: 2
 
-Function: Real part of "clog":
+Function: Real part of "cexp_towardzero":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
+
+Function: Imaginary part of "cexp_towardzero":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "clog":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
 
 Function: Imaginary part of "clog":
 float: 1
 ifloat: 1
 
 Function: Real part of "clog10":
+double: 3
+float: 4
+idouble: 3
+ifloat: 4
+
+Function: Imaginary part of "clog10":
 double: 2
 float: 2
 idouble: 2
 ifloat: 2
 
-Function: Imaginary part of "clog10":
+Function: Real part of "clog10_towardzero":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
+Function: Imaginary part of "clog10_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "clog_towardzero":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: Imaginary part of "clog_towardzero":
 double: 1
-float: 1
+float: 3
 idouble: 1
-ifloat: 1
+ifloat: 3
 
 Function: "cos":
 float: 1
@@ -184,42 +393,90 @@ ifloat: 1
 
 Function: Real part of "cpow":
 double: 2
-float: 4
+float: 5
 idouble: 2
-ifloat: 4
+ifloat: 5
 
 Function: Imaginary part of "cpow":
 float: 2
 ifloat: 2
 
+Function: Real part of "cpow_towardzero":
+double: 4
+float: 8
+idouble: 4
+ifloat: 8
+
+Function: Imaginary part of "cpow_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
 Function: Real part of "csin":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
 
-Function: Real part of "csinh":
-float: 1
-ifloat: 1
+Function: Real part of "csin_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
 
-Function: Imaginary part of "csinh":
+Function: Imaginary part of "csin_towardzero":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
 
-Function: Real part of "csqrt":
-double: 1
+Function: Real part of "csinh":
 float: 1
-idouble: 1
 ifloat: 1
 
-Function: Imaginary part of "csqrt":
+Function: Imaginary part of "csinh":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
 
+Function: Real part of "csinh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "csinh_towardzero":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+
+Function: Real part of "csqrt":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "csqrt":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "csqrt_towardzero":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: Imaginary part of "csqrt_towardzero":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
 Function: Real part of "ctan":
 double: 1
 float: 1
@@ -246,9 +503,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
@@ -270,25 +527,51 @@ ifloat: 3
 
 Function: "erf":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
 
-Function: "erfc":
+Function: "erf_towardzero":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
 
+Function: "erfc":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "erfc_towardzero":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
 Function: "exp10":
+double: 2
+idouble: 2
+
+Function: "exp10_towardzero":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "exp2":
 double: 1
 idouble: 1
 
-Function: "exp10_towardzero":
+Function: "exp2_towardzero":
 double: 1
 idouble: 1
 
 Function: "exp_towardzero":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
 
 Function: "expm1":
 double: 1
@@ -298,21 +581,31 @@ ifloat: 1
 
 Function: "expm1_towardzero":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 
 Function: "fma_towardzero":
 double: 1
 idouble: 1
 
 Function: "gamma":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: "gamma_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+
+Function: "hypot":
 double: 1
-float: 1
 idouble: 1
-ifloat: 1
 
-Function: "hypot":
+Function: "hypot_towardzero":
 double: 1
 idouble: 1
 
@@ -322,44 +615,94 @@ float: 2
 idouble: 2
 ifloat: 2
 
+Function: "j0_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+
 Function: "j1":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
 
+Function: "j1_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
 Function: "jn":
 double: 4
 float: 4
 idouble: 4
 ifloat: 4
 
+Function: "jn_towardzero":
+double: 5
+float: 5
+idouble: 5
+ifloat: 5
+
 Function: "lgamma":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+
+Function: "lgamma_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
 
 Function: "log":
 float: 1
 ifloat: 1
 
 Function: "log10":
-double: 1
+double: 2
 float: 2
-idouble: 1
+idouble: 2
 ifloat: 2
 
+Function: "log10_towardzero":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
 Function: "log1p":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log1p_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "log2":
+double: 2
 float: 1
+idouble: 2
 ifloat: 1
 
+Function: "log2_towardzero":
+double: 2
+idouble: 2
+
 Function: "pow":
 float: 1
 ifloat: 1
 
 Function: "pow_towardzero":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 
 Function: "sin":
@@ -376,9 +719,27 @@ Function: "sincos":
 float: 1
 ifloat: 1
 
-Function: "sinh_towardzero":
+Function: "sincos_towardzero":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
+
+Function: "sinh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "sinh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "tan":
+float: 1
+ifloat: 1
 
 Function: "tan_towardzero":
 double: 1
@@ -386,11 +747,29 @@ float: 1
 idouble: 1
 ifloat: 1
 
+Function: "tanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "tanh_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
 Function: "tgamma":
-double: 4
-float: 3
-idouble: 4
-ifloat: 3
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
+
+Function: "tgamma_towardzero":
+double: 5
+float: 4
+idouble: 5
+ifloat: 4
 
 Function: "y0":
 double: 2
@@ -398,16 +777,34 @@ float: 1
 idouble: 2
 ifloat: 1
 
+Function: "y0_towardzero":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
 Function: "y1":
 double: 3
 float: 2
 idouble: 3
 ifloat: 2
 
+Function: "y1_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
 Function: "yn":
 double: 3
 float: 2
 idouble: 3
 ifloat: 2
 
+Function: "yn_towardzero":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+
 # end of automatic generation
index 1db7327fc61894f85ed13b063f9105354f1bc133..46ba8b6afadc52ffb2ae5cad31996906a22bd3a8 100644 (file)
@@ -42,7 +42,7 @@
        .global _start
        .type _start,#function
 _start:
-#ifdef SHARED
+#ifdef PIC
        SETUP_PIC_REG(l7)
 #endif
 
@@ -57,7 +57,7 @@ _start:
        add     %sp, 23*4, %o2
 
   /* Load the addresses of the user entry points.  */
-#ifndef SHARED
+#ifndef PIC
        sethi   %hi(main), %o0
        sethi   %hi(__libc_csu_init), %o3
        sethi   %hi(__libc_csu_fini), %o4
index e1865f10cb217ecbd91b6a763690f5e324bdb718..75ff5093dc0a8f43d3ab4598a6a18cc50ad94fc1 100644 (file)
@@ -42,7 +42,7 @@
        .global _start
        .type _start,#function
 _start:
-#ifdef SHARED
+#ifdef PIC
        SETUP_PIC_REG(l7)
 #endif
 
@@ -58,7 +58,7 @@ _start:
        add     %sp, STACK_BIAS+23*8, %o2
 
   /* Load the addresses of the user entry points.  */
-#ifndef SHARED
+#ifndef PIC
        sethi   %hi(main), %o0
        sethi   %hi(__libc_csu_init), %o3
        sethi   %hi(__libc_csu_fini), %o4
index 4be45b95ff83544bcea6a0b3ee229c142e7b4aeb..444edbb7029e900880ca2df3e0f500ce91a63220 100644 (file)
@@ -78,18 +78,10 @@ enum __ptrace_request
   PTRACE_DETACH = 17,
 #define PT_DETACH PTRACE_DETACH
 
-  PTRACE_GET_THREAD_AREA = 22,
-
   /* Continue and stop at the next entry to or return from syscall.  */
   PTRACE_SYSCALL = 24,
 #define PT_SYSCALL PTRACE_SYSCALL
 
-  /* Get all hardware breakpoint registers.  */
-  PTRACE_GETHBPREGS = 29,
-
-  /* Set all hardware breakpoint registers.  */
-  PTRACE_SETHBPREGS = 30,
-
   /* Set ptrace filter options.  */
   PTRACE_SETOPTIONS = 0x4200,
 #define PT_SETOPTIONS PTRACE_SETOPTIONS
index 7715e680caa9551a24ea02e8a7d611c4f6509de4..d15ba95c9dc6ee597bded16772d525ff17027a20 100644 (file)
@@ -61,7 +61,7 @@ int pkey_set (int __key, unsigned int __access_rights) __THROW;
 
 /* Return the access rights for the current thread for KEY, which must
    have been allocated using pkey_alloc.  */
-int pkey_get (int _key) __THROW;
+int pkey_get (int __key) __THROW;
 
 /* Free an allocated protection key, which must have been allocated
    using pkey_alloc.  */
index b7093feab92cf22a36641207ba76c2452f4f39bd..98a23f0dd246523e55732043c53a37abb4bd38c5 100644 (file)
@@ -45,6 +45,7 @@
 int
 __lll_lock_elision (int *lock, short *adapt_count, EXTRAARG int pshared)
 {
+#ifndef __SPE__
   /* adapt_count is accessed concurrently but is just a hint.  Thus,
      use atomic accesses but relaxed MO is sufficient.  */
   if (atomic_load_relaxed (adapt_count) > 0)
@@ -82,5 +83,6 @@ __lll_lock_elision (int *lock, short *adapt_count, EXTRAARG int pshared)
                          aconf.skip_lock_out_of_tbegin_retries);
 
 use_lock:
+#endif
   return LLL_LOCK ((*lock), pshared);
 }
index b74a81064835d5be2cfc0e9d35a307977d0389e1..fabb03b2c4a0ab97bde8882c95ca12c026478569 100644 (file)
@@ -30,6 +30,7 @@
 int
 __lll_trylock_elision (int *futex, short *adapt_count)
 {
+#ifndef __SPE__
   /* Implement POSIX semantics by forbiding nesting elided trylocks.  */
   __libc_tabort (_ABORT_NESTED_TRYLOCK);
 
@@ -65,5 +66,6 @@ __lll_trylock_elision (int *futex, short *adapt_count)
     }
 
 use_lock:
+#endif
   return lll_trylock (*futex);
 }
index dcfab199d794aba62ca6b149bb551777b2b7da45..14e0680ee9b5a45b116efdff4d46a3ad233167aa 100644 (file)
@@ -23,6 +23,7 @@
 int
 __lll_unlock_elision (int *lock, short *adapt_count, int pshared)
 {
+#ifndef __SPE__
   /* When the lock was free we're in a transaction.  */
   if (*lock == 0)
     __libc_tend (0);
@@ -39,5 +40,8 @@ __lll_unlock_elision (int *lock, short *adapt_count, int pshared)
 
       lll_unlock ((*lock), pshared);
     }
+#else
+  lll_unlock ((*lock), pshared);
+#endif
   return 0;
 }
index 6e249ff82fa463a44beea1b179bb6557667bafac..7e27e0c1d64a814e7048e4929728208d4f17a0d2 100644 (file)
@@ -43,6 +43,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
+  Elf64_Ehdr *elf64_header = (Elf64_Ehdr *) elf_header;
   int ret;
   long flags;
 
@@ -59,7 +60,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
     {
       ret = process_elf64_file (file_name, lib, flag, osversion, soname,
                                file_contents, file_length);
-      flags = elf32_header->e_flags;
+      flags = elf64_header->e_flags;
     }
 
   /* RISC-V linkers encode the floating point ABI as part of the ELF headers.  */
index 695f172c634f960a133ea087df5c67bd9688a2e3..283aef1b304de4f3c4aac3a42c69f5ad77667175 100644 (file)
@@ -95,6 +95,19 @@ END(__setcontext)
 
 weak_alias (__setcontext, setcontext)
 
+/* We add an NOP here to separate between __setcontext/__startcontext. The
+   wanted behavior that happens is: when unwinding from a function called
+   inside a makecontext() context, FDE lookup will use '&__startcontext - 1',
+   then returns NULL for no FDE found, and immediately ends the unwind, in
+   a normal fashion.
+
+   If this NOP word does not exist, FDE lookup just repeatedly finds
+   __setcontext's FDE in an infinite loop, due to the convention of using
+   'address - 1' for FDE lookup. Modifiying/deleting the below
+   __startcontext's FDE has no help on this.  */
+
+       nop
+
 /* This is the helper code which gets called if a function which is
    registered with 'makecontext' returns.  In this case we have to
    install the context listed in the uc_link element of the context
index 49d30438f38c26b2b93f198fe78b6606fd278530..4b55e34402ff3dca43cd7002e60a7b50966c8c3f 100644 (file)
@@ -68,7 +68,7 @@ typedef __pid_t pid_t;
 __BEGIN_DECLS
 
 /* Time used by the program so far (user time + system time).
-   The result / CLOCKS_PER_SECOND is program time in seconds.  */
+   The result / CLOCKS_PER_SEC is program time in seconds.  */
 extern clock_t clock (void) __THROW;
 
 /* Return the current time and put it in *TIMER if TIMER is not NULL.  */