commit aa138eda8f46ab6ffbafe9aeab41bd8e560f0df6 (HEAD -> gentoo/2.31)
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Feb 10 12:57:28 2020 -0300

    sparc: Avoid clobbering register parameters in syscall
    
    The sparc INTERNAL_SYSCALL macro might clobber the register
    parameter if the argument itself might clobber any register (a function
    call for instance).
    
    This patch fixes it by using temporary variables for the expressions
    between the register assignments (as indicated by GCC documentation,
    6.47.5.2 Specifying Registers for Local Variables).
    
    It is similar to the fix done for MIPS (bug 25523).
    
    Checked on sparc64-linux-gnu and sparcv9-linux-gnu.

 sysdeps/unix/sysv/linux/sparc/sysdep.h | 80 ++++++++++++++++++++++------------
 1 file changed, 53 insertions(+), 27 deletions(-)

commit 0495976d412e6e863f9961c7fc3cfe7390d809a3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 28 19:33:01 2020 -0300

    sparc: Use Linux kABI for syscall return
    
    It changes the sparc internal_syscall* macros to return a negative
    value instead of the 'g1' register value in the 'err' macro argument.
    The __SYSCALL_STRING macro is also changed to no set the 'g1'
    value, since 'o1' already holds all the required information
    to check if syscall has failed.
    
    The macro INTERNAL_SYSCALL_DECL is no longer required, and the
    INTERNAL_SYSCALL_ERROR_P macro follows the other Linux kABIs.
    The redefinition of INTERNAL_VSYSCALL_CALL is also no longer
    required.
    
    Checked on sparc64-linux-gnu and sparcv9-linux-gnu. It fixes
    the sporadic issues on sparc32 where clock_nanosleep does not
    act as cancellation entrypoint.

 sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h |  3 +-
 sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h |  3 +-
 sysdeps/unix/sysv/linux/sparc/sysdep.h         | 80 ++++++++++++--------------
 3 files changed, 38 insertions(+), 48 deletions(-)

commit 4901cea39ba5abf8d5cec53d220212b37b7a5172 (tag: gentoo/glibc-2.31-6, gentoo/gentoo/2.31)
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Tue Jun 9 23:52:27 2020 +0300

    [no-patch] Gentoo: remove remaining patchset generation logic, now in separate repo

 scripts/gentoo/README.Gentoo.patches |  26 ---------
 scripts/gentoo/extra/.keep           |   0
 scripts/gentoo/make-tarball.sh       | 107 -----------------------------------
 3 files changed, 133 deletions(-)

commit c221b7e2d4c2b6bd9dc2d35d323f73925feb35f5
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue May 19 14:09:38 2020 +0200

    nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976]
    
    During cleanup, before returning from get*_r functions, the end*ent
    calls must not change errno.  Otherwise, an ERANGE error from the
    underlying implementation can be hidden, causing unexpected lookup
    failures.  This commit introduces an internal_end*ent_noerror
    function which saves and restore errno, and marks the original
    internal_end*ent function as warn_unused_result, so that it is used
    only in contexts were errors from it can be handled explicitly.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    (cherry picked from commit 790b8dda4455865cb8c3a47801f4304c1a43baf6)
    (cherry picked from commit 3a44844c97a8ca1d0798c45b5252e6a49f9cf8e1)

 NEWS                               |  1 +
 nss/nss_compat/compat-grp.c        | 15 ++++++++++++---
 nss/nss_compat/compat-initgroups.c | 13 +++++++++++--
 nss/nss_compat/compat-pwd.c        | 15 ++++++++++++---
 nss/nss_compat/compat-spwd.c       | 14 +++++++++++---
 5 files changed, 47 insertions(+), 11 deletions(-)

commit 69a48d8b83d17a9ce88bcee0d3c09a871e9923d0
Author: Lexi Shao <shaolexi@huawei.com>
Date:   Fri May 15 18:48:59 2020 +0800

    aarch64: fix strcpy and strnlen for big-endian [BZ #25824]
    
    This patch fixes the optimized implementation of strcpy and strnlen
    on a big-endian arm64 machine.
    
    The optimized method uses neon, which can process 128bit with one
    instruction. On a big-endian machine, the bit order should be reversed
    for the whole 128-bits double word. But with instuction
            rev64   datav.16b, datav.16b
    it reverses 64bits in the two halves rather than reversing 128bits.
    There is no such instruction as rev128 to reverse the 128bits, but we
    can fix this by loading the data registers accordingly.
    
    Fixes 0237b61526e7("aarch64: Optimized implementation of strcpy") and
    2911cb68ed3d("aarch64: Optimized implementation of strnlen").
    
    Signed-off-by: Lexi Shao <shaolexi@huawei.com>
    Reviewed-by: Szabolcs Nagy  <szabolcs.nagy@arm.com>
    (cherry picked from commit 59b64f9cbbf1e98c6d187873de6c363994aee19d)
    (cherry picked from commit c839175267842bd9e20fdb6637c82f2790d3754f)

 sysdeps/aarch64/strcpy.S  | 5 +++++
 sysdeps/aarch64/strnlen.S | 5 +++++
 2 files changed, 10 insertions(+)

commit 0ecf2c5a06c238c357d718f66bd954fdad12352b
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue May 12 11:30:30 2020 +0200

    aarch64: Accept PLT calls to __getauxval within libc.so
    
    When using outline atomics (-moutline-atomics, the default for ARMv8-A
    starting with GCC 10), libgcc contains an ELF constructor which calls
    __getauxval.  This code is built outside of glibc, so none of its
    internal PLT avoidance schemes can be applied to it.  This change
    suppresses the elf/check-localplt failure.
    
    (cherry picked from commit 16536e98e36e08bc1ce1edbd8dd50c7c3bb7a936)
    (cherry picked from commit 587a332b6fadc4d9f1035ecaa52ba32ee41cd300)
    (cherry picked from commit 109474122400ca7d60782b131dc867a5c1f2fe55)

 sysdeps/unix/sysv/linux/aarch64/localplt.data | 3 +++
 1 file changed, 3 insertions(+)

commit cf9e03c4147b43a34bbb6b4ba71f434029619b1e
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Tue May 12 23:46:17 2020 +0300

    [no-patch] Gentoo: remove etc files, now in FILESDIR

 scripts/gentoo/extra/.keep         |  0
 scripts/gentoo/extra/etc/host.conf | 24 -----------
 scripts/gentoo/extra/etc/nscd      | 85 --------------------------------------
 3 files changed, 109 deletions(-)

commit b679ab84afd953996e73a247a4e7e52580c4f90f (tag: gentoo/glibc-2.31-5)
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Tue May 12 18:28:56 2020 +0300

    [no-patch] Gentoo: remove locale-gen from repo, packaged separately now

 scripts/gentoo/extra/README              |   5 -
 scripts/gentoo/extra/locale/locale-gen   | 444 -------------------------------
 scripts/gentoo/extra/locale/locale-gen.8 |  69 -----
 scripts/gentoo/extra/locale/locale.gen   |  36 ---
 scripts/gentoo/extra/locale/locale.gen.5 |  77 ------
 5 files changed, 631 deletions(-)

commit 25395cb95d1a458bd7e29210115fb3640cb1d66f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat May 9 12:43:53 2020 -0700

    NEWS: Mention fixes for BZ 25810/25896/25902/25966
    
    (cherry picked from commit a98b8b221cfe732dc7c19ae1d22665002e254c96)

 NEWS | 4 ++++
 1 file changed, 4 insertions(+)

commit 0494741209669294da7e9cb0d3d60efa29505d2b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat May 9 12:04:23 2020 -0700

    x86-64: Use RDX_LP on __x86_shared_non_temporal_threshold [BZ #25966]
    
    Since __x86_shared_non_temporal_threshold is defined as
    
    long int __x86_shared_non_temporal_threshold;
    
    and long int is 4 bytes for x32, use RDX_LP to compare against
    __x86_shared_non_temporal_threshold in assembly code.
    
    (cherry picked from commit 55c7bcc71b84123d5d4bd2814366a6b05fcf8ebd)
    (cherry picked from commit 4c833bbebe366ac5baec87dd68ec0a4962ee86ae)

 sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit c5ad5ab376d24229c0865ba00a843c2da671275f
Author: Rafał Lużyński <digitalfreak@lingonborough.com>
Date:   Sat May 9 17:07:02 2020 +0200

    NEWS: Mention bug 25639 fixed in 2.31 branch
    
    (cherry picked from commit 3b9ceb332049c711e02e7b95f9b20180115c9209)

 NEWS | 2 ++
 1 file changed, 2 insertions(+)

commit ecffc318fe4badcbac79ebea645f78dd018bc390
Author: Rafał Lużyński <digitalfreak@lingonborough.com>
Date:   Mon Apr 6 23:45:52 2020 +0200

    oc_FR locale: Fix spelling of April (bug 25639)
    
    Confirmed by CLDR and a native speaker: "abril" is more often used even
    if "abrial" is also correct.  Both nominative (alt_mon) and genitive (mon)
    cases are updated.
    
    (cherry picked from commit bb44fe7711a63bbe46e71503e691e1d02a40bae1)

 localedata/locales/oc_FR | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 28bf0d9d7e995117f6b053546adac339ab312ade
Author: Rafał Lużyński <digitalfreak@lingonborough.com>
Date:   Thu Mar 19 00:09:29 2020 +0100

    oc_FR locale: Fix spelling of Thursday (bug 25639)
    
    As reported by a native speaker:
    
    Thursday: "dijóus" -> "dijòus" (also confirmed by CLDR)
    (cherry picked from commit f2ac7920474e5b64c8c077a85afcb62bec957cce)

 localedata/locales/oc_FR | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 25245088d1ffd6a139befbef5c777856ef33250e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Apr 30 10:42:43 2020 -0700

    Add a C wrapper for prctl [BZ #25896]
    
    Add a C wrapper to pass arguments in
    
    /* Control process execution.  */
    extern int prctl (int __option, ...) __THROW;
    
    to prctl syscall:
    
    extern int prctl (int, unsigned long int, unsigned long int,
                      unsigned long int, unsigned long int);
    
    (cherry picked from commit ff026950e280bc3e9487b41b460fb31bc5b57721)
    (cherry picked from commit 18fdba553dd9b907e9812b90d2cea593f776058f)

 include/sys/prctl.h                   |  1 +
 sysdeps/unix/sysv/linux/Makefile      |  1 +
 sysdeps/unix/sysv/linux/prctl.c       | 42 +++++++++++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/syscalls.list |  1 -
 4 files changed, 44 insertions(+), 1 deletion(-)

commit 782b8240bf99d0c068a337b3ff7caeeadbd83a92
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Apr 30 15:49:47 2020 -0700

    powerpc: Rename argN to _argN in LOADARGS_N [BZ #25902]
    
    LOADARGS_N in powerpc/sysdep.h uses argN as local variables.  It breaks
    when argN is also a function argument.  Rename argN to _argN to avoid
    conflict.
    
    (cherry picked from commit 14f43dd34dcf1ba29386c01cd0b286dffb37412d)
    (cherry picked from commit 7c9e054afddf7980a02796a1278a77d981ebdfda)

 sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 24 +++++++++++-----------
 sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 24 +++++++++++-----------
 2 files changed, 24 insertions(+), 24 deletions(-)

commit b60c766c14c327ca1622f0ffc9944a2c31798cc2
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Apr 29 13:20:27 2020 -0700

    Add C wrappers for process_vm_readv/process_vm_writev [BZ #25810]
    
    Since the the U marker can only be applied to 2 unsigned long arguments
    in syscalls.list files, add a C wrapper for process_vm_readv and
    process_vm_writev syscals which have more than 2 unsigned long arguments.
    
    (cherry picked from commit ad9fd65d716f1ccd757b6b2feeee826d0f187ed4)
    (cherry picked from commit 9c5ae39a644fb7773c4b5f8ff124204561292bfd)

 sysdeps/unix/sysv/linux/Makefile            |  3 ++-
 sysdeps/unix/sysv/linux/process_vm_readv.c  | 32 +++++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/process_vm_writev.c | 32 +++++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/syscalls.list       |  2 --
 4 files changed, 66 insertions(+), 3 deletions(-)

commit 43ff0a16a3e4ce139defda8b3ab662d769c946b9
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Apr 29 08:08:40 2020 -0700

    Mark unsigned long arguments with U in more syscalls [BZ #25810]
    
    Mark unsigned long arguments in mmap, read, recv, recvfrom, send, sendto,
    write, ioperm, sendfile64, setxattr, lsetxattr, fsetxattr, getxattr,
    lgetxattr, fgetxattr, listxattr, llistxattr and flistxattr with U in
    syscalls.list files.
    
    (cherry picked from commit 86f4f2263bf21ff7f80905b3062c16213b016fe6)
    (cherry picked from commit 63c3696a4ac3733484cf5b7f69b2be7c71086374)

 sysdeps/unix/syscalls.list            | 14 +++++++-------
 sysdeps/unix/sysv/linux/syscalls.list | 22 +++++++++++-----------
 2 files changed, 18 insertions(+), 18 deletions(-)

commit ff5c3d1207d31b577dbc1aa127f2343d349713e1
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Apr 22 09:48:10 2020 -0700

    Add a syscall test for [BZ #25810]
    
    Add a test to pass 64-bit long arguments to syscall with undefined upper
    32 bits on x32.
    
    Tested on i386, x86-64 and x32 as well as with build-many-glibcs.py.
    
    (cherry picked from commit 781dacc4f41332098e3a272514b20a490a7ebc8c)
    (cherry picked from commit 5b9d49293b79804e756d3aa14e50e2f6b47c5667)

 misc/Makefile       |   2 +-
 misc/tst-syscalls.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 168 insertions(+), 1 deletion(-)

commit c73f447b565cbb42a2cca9569cfd02bc8a84b260
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Apr 29 05:35:34 2020 -0700

    Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810]
    
    X32 has 32-bit long and pointer with 64-bit off_t.  Since x32 psABI
    requires that pointers passed in registers must be zero-extended to
    64bit, x32 can share many syscall interfaces with LP64.  When a LP64
    syscall with long and unsigned long int arguments is used for x32, these
    arguments must be properly extended to 64-bit.  Otherwise if the upper
    32 bits of the register have undefined value, such a syscall will be
    rejected by kernel.
    
    For syscalls implemented in assembly codes, 'U' is added to syscall
    signature key letters for unsigned long, which is zero-extended to
    64-bit types.  SYSCALL_ULONG_ARG_1 and SYSCALL_ULONG_ARG_2 are passed
    to syscall-template.S for the first and the second unsigned long int
    arguments if PSEUDOS_HAVE_ULONG_INDICES is defined.  They are used by
    x32 to zero-extend 32-bit arguments to 64 bits.
    
    Tested on i386, x86-64 and x32 as well as with build-many-glibcs.py.
    
    (cherry picked from commit 2ad5d0845d80589d0adf86593bd36a7c71a521f8)
    (cherry picked from commit 496b5963a7577aa5d956db4392b79e56cc23ba87)

 sysdeps/unix/make-syscalls.sh               | 24 ++++++++++
 sysdeps/unix/syscall-template.S             | 49 ++++++++++++++++++--
 sysdeps/unix/syscalls.list                  |  8 ++--
 sysdeps/unix/sysv/linux/syscalls.list       | 16 +++----
 sysdeps/unix/sysv/linux/x86_64/sysdep.h     | 71 +++++++++++++++++++++++------
 sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h | 21 ++++++++-
 6 files changed, 159 insertions(+), 30 deletions(-)

commit d6566a93a7bcf72d8dc1037bde591bc768b76b49
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Apr 13 10:31:26 2020 -0700

    x32: Properly pass long to syscall [BZ #25810]
    
    X32 has 32-bit long and pointer with 64-bit off_t.  Since x32 psABI
    requires that pointers passed in registers must be zero-extended to
    64bit, x32 can share many syscall interfaces with LP64.  When a LP64
    syscall with long and unsigned long arguments is used for x32, these
    arguments must be properly extended to 64-bit.  Otherwise if the upper
    32 bits of the register have undefined value, such a syscall will be
    rejected by kernel.
    
    Enforce zero-extension for pointers and array system call arguments.
    For integer types, extend to int64_t (the full register) using a
    regular cast, resulting in zero or sign extension based on the
    signedness of the original type.
    
    For
    
           void *mmap(void *addr, size_t length, int prot, int flags,
                      int fd, off_t offset);
    
    we now generate
    
       0:   41 f7 c1 ff 0f 00 00    test   $0xfff,%r9d
       7:   75 1f                   jne    28 <__mmap64+0x28>
       9:   48 63 d2                movslq %edx,%rdx
       c:   89 f6                   mov    %esi,%esi
       e:   4d 63 c0                movslq %r8d,%r8
      11:   4c 63 d1                movslq %ecx,%r10
      14:   b8 09 00 00 40          mov    $0x40000009,%eax
      19:   0f 05                   syscall
    
    That is
    
    1. addr is unchanged.
    2. length is zero-extend to 64 bits.
    3. prot is sign-extend to 64 bits.
    4. flags is sign-extend to 64 bits.
    5. fd is sign-extend to 64 bits.
    6. offset is unchanged.
    
    For int arguments, since kernel uses only the lower 32 bits and ignores
    the upper 32 bits in 64-bit registers, these work correctly.
    
    Tested on x86-64 and x32.  There are no code changes on x86-64.
    
    (cherry picked from commit df76ff3a446a787a95cf74cb15c285464d73a93d)
    (cherry picked from commit 04330f85263f5dc823f33d7fa858d8b33d7f42ce)

 sysdeps/unix/sysv/linux/x86_64/sysdep.h     | 15 +++++++++------
 sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h | 16 ++++++++++++++++
 2 files changed, 25 insertions(+), 6 deletions(-)

commit 85e90c944c88136ab90ba803b657196cec822bee
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Mar 17 22:57:42 2020 +0000

    Fix build with GCC 10 when long double = double.
    
    On platforms where long double has the same ABI as double, glibc
    defines long double functions as aliases for the corresponding double
    functions.  The declarations of those functions in <math.h> are
    disabled to avoid problems with aliases having incompatible types, but
    GCC 10 now gives errors for incompatible types when the long double
    function is known to GCC as a built-in function, not just when there
    is an incompatible header declaration.
    
    This patch fixes those errors by using appropriate
    -fno-builtin-<function> options to compile the double functions.  The
    list of CFLAGS-* settings is an appropriately adapted version of that
    in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c
    files; in particular, the options are used even if GCC does not
    currently have a built-in function of a given function, so that adding
    such a built-in function in future will not break the glibc build.
    Thus, various of the CFLAGS-* settings are only for future-proofing
    and may not currently be needed (and it's possible some could be
    irrelevant for other reasons).
    
    Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and
    glibcs builds), where it fixes the build that previously failed.
    
    (cherry picked from commit 49348beafe9ba150c9bd48595b3f372299bddbb0)
    (cherry picked from commit de371d1581f379ada10163d9172a8fde676d13b4)

 math/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)

commit 9d784ab468add923b13dcf5c54d9a48e8fa053aa
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Mon Mar 30 21:58:06 2020 +0000

    Add new file missed in previous hppa commit.
    
    (cherry picked from commit acdcca72940e060270e4e54d9c0457398110f409)
    (cherry picked from commit ece4e11d55df3794ff858e23d0dd73b7b43ef9e9)

 sysdeps/hppa/dl-runtime.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

commit ecb8f162fc5829dc3571f7b6d24bb6ee91ae82f0
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Mon Mar 30 20:36:49 2020 +0000

    Fix data race in setting function descriptors during lazy binding on hppa.
    
    This addresses an issue that is present mainly on SMP machines running
    threaded code.  In a typical indirect call or PLT import stub, the
    target address is loaded first.  Then the global pointer is loaded into
    the PIC register in the delay slot of a branch to the target address.
    During lazy binding, the target address is a trampoline which transfers
    to _dl_runtime_resolve().
    
    _dl_runtime_resolve() uses the relocation offset stored in the global
    pointer and the linkage map stored in the trampoline to find the
    relocation.  Then, the function descriptor is updated.
    
    In a multi-threaded application, it is possible for the global pointer
    to be updated between the load of the target address and the global
    pointer.  When this happens, the relocation offset has been replaced
    by the new global pointer.  The function pointer has probably been
    updated as well but there is no way to find the address of the function
    descriptor and to transfer to the target.  So, _dl_runtime_resolve()
    typically crashes.
    
    HP-UX addressed this problem by adding an extra pc-relative branch to
    the trampoline.  The descriptor is initially setup to point to the
    branch.  The branch then transfers to the trampoline.  This allowed
    the trampoline code to figure out which descriptor was being used
    without any modification to user code.  I didn't use this approach
    as it is more complex and changes function pointer canonicalization.
    
    The order of loading the target address and global pointer in
    indirect calls was not consistent with the order used in import stubs.
    In particular, $$dyncall and some inline versions of it loaded the
    global pointer first.  This was inconsistent with the global pointer
    being updated first in dl-machine.h.  Assuming the accesses are
    ordered, we want elf_machine_fixup_plt() to store the global pointer
    first and calls to load it last.  Then, the global pointer will be
    correct when the target function is entered.
    
    However, just to make things more fun, HP added support for
    out-of-order execution of accesses in PA 2.0.  The accesses used by
    calls are weakly ordered. So, it's possibly under some circumstances
    that a function might be entered with the wrong global pointer.
    However, HP uses weakly ordered accesses in 64-bit HP-UX, so I assume
    that loading the global pointer in the delay slot of the branch must
    work consistently.
    
    The basic fix for the race is a combination of modifying user code to
    preserve the address of the function descriptor in register %r22 and
    setting the least-significant bit in the relocation offset.  The
    latter was suggested by Carlos as a way to distinguish relocation
    offsets from global pointer values.  Conventionally, %r22 is used
    as the address of the function descriptor in calls to $$dyncall.
    So, it wasn't hard to preserve the address in %r22.
    
    I have updated gcc trunk and gcc-9 branch to not clobber %r22 in
    $$dyncall and inline indirect calls.  I have also modified the import
    stubs in binutils trunk and the 2.33 branch to preserve %r22.  This
    required making the stubs one instruction longer but we save one
    relocation.  I also modified binutils to align the .plt section on
    a 8-byte boundary.  This allows descriptors to be updated atomically
    with a floting-point store.
    
    With these changes, _dl_runtime_resolve() can fallback to an alternate
    mechanism to find the relocation offset when it has been clobbered.
    There's just one additional instruction in the fast path. I tested
    the fallback function, _dl_fix_reloc_arg(), by changing the branch to
    always use the fallback.  Old code still runs as it did before.
    
    Fixes bug 23296.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    (cherry picked from commit 1a044511a3f9020c3f430164e0a6a77426fecd7e)
    (cherry picked from commit 91b909315c4e33e4569529886d8b7dbbf97b244c)

 NEWS                                          |  1 +
 sysdeps/hppa/dl-fptr.c                        | 26 +++++++---
 sysdeps/hppa/dl-machine.h                     | 36 +++++++++++--
 sysdeps/hppa/dl-trampoline.S                  | 74 +++++++++++++++++++++++----
 sysdeps/unix/sysv/linux/hppa/atomic-machine.h | 28 ++++++++++
 5 files changed, 143 insertions(+), 22 deletions(-)

commit 2888e02bc32427f3ab8d0c9a59258d2c8a632460
Author: Chung-Lin Tang <cltang@codesourcery.com>
Date:   Mon May 4 20:23:25 2020 +0800

    nios2: delete sysdeps/unix/sysv/linux/nios2/kernel-features.h
    
    Commit 06436acf819d9e6ada7be3ca977d5c0a23d3f138 created a kernel-features.h
    file with '#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64', which is wrong for Nios II.
    Deleting the header.
    
    (cherry picked from commit 38c67888183db1b6ac21f2f9681b8a384987dfe8)
    (cherry picked from commit b999c0098ae1ba8afcbb6086efd1c6163be0cdf1)

 sysdeps/unix/sysv/linux/nios2/kernel-features.h | 22 ----------------------
 1 file changed, 22 deletions(-)

commit 3bab097fc7e2b8972e2d9cfb16cb61f28e84f46b (tag: gentoo/glibc-2.31-4)
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Feb 17 10:57:56 2020 -0300

    mips: Fix bracktrace result for signal frames
    
    MIPS fallback code handle a frame where its FDE can not be obtained
    (for instance a signal frame) by reading the kernel allocated signal frame
    and adding '2' to the value of 'sc_pc' [1].  The added value is used to
    recognize an end of an EH region on mips16 [2].
    
    The fix adjust the obtained signal frame value and remove the libgcc added
    value by checking if the previous frame is a signal frame one.
    
    Checked with backtrace and tst-sigcontext-get_pc tests on mips-linux-gnu
    and mips64-linux-gnu.
    
    [1] libgcc/config/mips/linux-unwind.h from gcc code.
    [2] gcc/config/mips/mips.h from gcc code.  */
    
    (cherry picked from commit 6e05978f0c30e52420e086cc3156655471e6fb0a)
    (cherry picked from commit 54ba2541b3a76441a9cbe5dd14c963bf874fd5e9)

 debug/backtrace.c                          |  5 +++
 sysdeps/generic/unwind-arch.h              | 30 +++++++++++++
 sysdeps/unix/sysv/linux/mips/unwind-arch.h | 67 ++++++++++++++++++++++++++++++
 3 files changed, 102 insertions(+)

commit afd24c3072d4af1013ef873daeb8fbc5f331b78d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 24 15:48:34 2020 -0300

    stdlib: Move tst-system to tests-container
    
    Fix some issues with different shell and error messages.
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.
    
    (cherry picked from commit 4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9)
    (cherry picked from commit 83d3eec6728d1df6e7c436540671b9747e85079a)

 stdlib/Makefile     |  3 ++-
 stdlib/tst-system.c | 10 ++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

commit 84f611babe6f4d34465eec2b23f258138f747aa6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 24 15:47:13 2020 -0300

    support/shell-container.c: Add builtin kill
    
    No options supported.
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    
    (cherry picked from commit 1c17100c43c0913ec94f3bcc966bf3792236c690)
    (cherry picked from commit ad9b0037ccc588804ef4c5e58feeab370543cf5a)

 support/shell-container.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

commit 9d709a1a8b2ddfb0f46c083b9b24af6d3c3ea9fe
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 24 15:40:36 2020 -0300

    support/shell-container.c: Add builtin exit
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    
    (cherry picked from commit 5a5a3a3234bc220a5192d620e0cbc5360da46f14)
    (cherry picked from commit 2448ba1d724bec8cd162084fc51aaecea3929727)

 support/shell-container.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

commit da171454a4de9080d4b7d90ad1fb1cf97416bcf0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 24 15:36:23 2020 -0300

    support/shell-container.c: Return 127 if execve fails
    
    Reviewed-by: DJ Delorie <dj@redhat.com>
    
    (cherry picked from commit 5fce0e095bc413f908f472074c2235198cd76bf4)
    (cherry picked from commit 5810e6d75fffa62cdf8a37592ed1be7f262eac98)

 support/shell-container.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 243fc76c6b3f58d891134639276f11bfe0f1fc83
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Tue Mar 24 22:49:10 2020 +0100

    Add NEWS entry for CVE-2020-1751 (bug 25423)
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    
    (cherry picked from commit 07d16a6debc830ebcf9533da5396edd2eff688e0)
    (cherry picked from commit d39fb022c26cf6ad832f6ad0e94ff5b5e4b511cf)

 NEWS | 3 +++
 1 file changed, 3 insertions(+)

commit ef8310ceef31496023642de681ad3a305e3c8471
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Mar 23 15:23:20 2020 -0300

    posix: Fix system error return value [BZ #25715]
    
    It fixes 5fb7fc9635 when posix_spawn fails.
    
    Checked on x86_64-linux-gnu and i686-linux-gnu.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    
    (cheery picked from commit f09542c584b121da0322fde4b55306d512b85d93)
    
    (cherry picked from commit 46bbbd4622351528ae22c2d3397ab090f5099e82)

 NEWS                   |   1 +
 stdlib/tst-system.c    | 122 +++++++++++++++++++++++++++++++++++++++++++++++--
 sysdeps/posix/system.c |  18 +++++---
 3 files changed, 130 insertions(+), 11 deletions(-)

commit d7effd61682650ee875994aa7c9fb623cb32085d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Apr 6 06:02:11 2020 -0700

    i386: Disable check_consistency for GCC 5 and above [BZ #25788]
    
    check_consistency should be disabled for GCC 5 and above since there is
    no fixed PIC register in GCC 5 and above.  Check __GNUC_PREREQ (5,0)
    instead OPTIMIZE_FOR_GCC_5 since OPTIMIZE_FOR_GCC_5 is false with
    -fno-omit-frame-pointer.
    
    (cherry picked from commit f90a7e96df87edadd503a0a32aa70fb97c55a044)
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sysdeps/unix/sysv/linux/i386/sysdep.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

commit 7febadfe5f7ef77024b9317e9e4eb5470ef2a1c7 (tag: gentoo/glibc-2.31-3)
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Thu Mar 19 22:53:00 2020 +0100

    Add NEWS entry for CVE-2020-1752 (bug 25414)
    
    (cherry picked from commit 39a05214fe14ff722d4d92e697fb71ff15e84e70)

 NEWS | 3 +++
 1 file changed, 3 insertions(+)

commit a61ea9782b50f2b375bbde356cc3615defad3452
Author: Andreas Schwab <schwab@suse.de>
Date:   Wed Feb 19 17:21:46 2020 +0100

    Fix use-after-free in glob when expanding ~user (bug 25414)
    
    The value of `end_name' points into the value of `dirname', thus don't
    deallocate the latter before the last use of the former.
    
    (cherry picked from commit ddc650e9b3dc916eab417ce9f79e67337b05035c)

 posix/glob.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

commit 70c1be7f093bb57c5aa9a0a28b0d4c3a66e26e00
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Feb 7 13:54:58 2020 +0000

    Update syscall lists for Linux 5.5.
    
    Linux 5.5 has no new syscalls to add to syscall-names.list, but it
    does newly enable the clone3 syscall for AArch64.  This patch updates
    the kernel version listed in syscall-names.list and regenerates the
    AArch64 arch-syscall.h.
    
    Tested with build-many-glibcs.py.
    
    (cherry picked from commit 5828bc4523230685ac29a4a882967913255f5666)

 sysdeps/unix/sysv/linux/aarch64/arch-syscall.h | 1 +
 sysdeps/unix/sysv/linux/syscall-names.list     | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

commit ce62145c36f23a4d91bce5b08dc9516a738f4ddd
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Wed Mar 11 12:55:36 2020 +0100

    NEWS: update list of bugs fixed on the 2.31 branch

 NEWS | 4 ++++
 1 file changed, 4 insertions(+)

commit 9b5e00f516dc19a4b706e90a534e8e2d494d4cb6
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Wed Mar 4 22:32:32 2020 +0100

    Add NEWS entry for CVE-2020-10029 (bug 25487)
    
    (cherry picked from commit 15ab195229dc288d1d49612c3de14a33b88065ed)

 NEWS | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

commit 588a2db536418389fbd1fb793ba6fc800aa33dac
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Feb 13 17:01:15 2020 +0100

    math/test-sinl-pseudo: Use stack protector only if available
    
    This fixes commit 9333498794cde1d5cca518bad ("Avoid ldbl-96 stack
    corruption from range reduction of pseudo-zero (bug 25487).").
    
    (cherry picked from commit c10acd40262486dac597001aecc20ad9d3bd0e4a)

 sysdeps/ieee754/ldbl-96/Makefile | 2 ++
 1 file changed, 2 insertions(+)

commit dccf94f1a172dc57f1fed22bba74059c7730c4cb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 5 13:38:24 2020 -0300

    sparc: Move sigreturn stub to assembly
    
    It seems that some gcc versions might generates a stack frame for the
    sigreturn stub requires on sparc signal handling.  For instance:
    
      $ cat test.c
      #define _GNU_SOURCE
      #include <sys/syscall.h>
    
      __attribute__ ((__optimize__ ("-fno-stack-protector")))
      void
      __sigreturn_stub (void)
      {
        __asm__ ("mov %0, %%g1\n\t"
                "ta  0x10\n\t"
                : /* no outputs */
                : "i" (SYS_rt_sigreturn));
      }
      $ gcc -v
      [...]
      gcc version 9.2.1 20200224 (Debian 9.2.1-30)
      $ gcc -O2 -m64 test.c -S -o -
      [...]
        __sigreturn_stub:
              save    %sp, -176, %sp
      #APP
      ! 9 "t.c" 1
              mov 101, %g1
              ta  0x10
    
      ! 0 "" 2
      #NO_APP
              .size   __sigreturn_stub, .-__sigreturn_stub
    
    As indicated by kernel developers [1], the sigreturn stub can not change
    the register window or the stack pointer since the kernel has setup the
    restore frame at a precise location relative to the stack pointer when
    the stub is invoked.
    
    I tried to play with some compiler flags and even with _Noreturn and
    __builtin_unreachable after the asm does not help (and Sparc does not
    support naked functions).
    
    To avoid similar issues, as the stack-protector support also have
    stumbled, this patch moves the implementation of the sigreturn stubs to
    assembly.
    
    Checked on sparcv9-linux-gnu and sparc64-linux-gnu with gcc 9.2.1
    and gcc 7.5.0.
    
    [1] https://lkml.org/lkml/2016/5/27/465

 sysdeps/unix/sysv/linux/sparc/Makefile             |  8 +++--
 sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c  | 26 ++---------------
 .../unix/sysv/linux/sparc/sparc32/sigreturn_stub.S | 34 ++++++++++++++++++++++
 sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c  | 14 ++-------
 .../unix/sysv/linux/sparc/sparc64/sigreturn_stub.S | 29 ++++++++++++++++++
 5 files changed, 73 insertions(+), 38 deletions(-)

commit 27adc84bf90838fc401209dd948d72866160f37e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 5 13:14:41 2020 +0000

    arm: Fix softp-fp Implies (BZ #25635)
    
    The commit "arm: Split BE/LE abilist"
    (1673ba87fefe019c834c09d33673d1d453ea698d) changed the soft-fp order for
    ARM selection when __SOFTFP__ is defined by the compiler.
    
    On 2.30 the sysdeps order is:
    
    2.30
    sysdeps/unix/sysv/linux/arm
    sysdeps/arm/nptl
    sysdeps/unix/sysv/linux
    sysdeps/nptl
    sysdeps/pthread
    sysdeps/gnu
    sysdeps/unix/inet
    sysdeps/unix/sysv
    sysdeps/unix/arm
    sysdeps/unix
    sysdeps/posix
    sysdeps/arm/nofpu
    sysdeps/ieee754/soft-fp
    sysdeps/arm
    sysdeps/wordsize-32
    sysdeps/ieee754/flt-32
    sysdeps/ieee754/dbl-64
    sysdeps/ieee754
    sysdeps/generic
    
    While on master is:
    
    sysdeps/unix/sysv/linux/arm/le
    sysdeps/unix/sysv/linux/arm
    sysdeps/arm/nptl
    sysdeps/unix/sysv/linux
    sysdeps/nptl
    sysdeps/pthread
    sysdeps/gnu
    sysdeps/unix/inet
    sysdeps/unix/sysv
    sysdeps/unix/arm
    sysdeps/unix
    sysdeps/posix
    sysdeps/arm/le
    sysdeps/arm
    sysdeps/wordsize-32
    sysdeps/ieee754/flt-32
    sysdeps/ieee754/dbl-64
    sysdeps/arm/nofpu
    sysdeps/ieee754/soft-fp
    sysdeps/ieee754
    sysdeps/generic
    
    It make the build select some routines (fadd, fdiv, fmul, fsub, and fma)
    on ieee754/flt-32 and ieee754/dbl-64 that requires fenv support to be
    correctly rounded which in turns lead to math failures since the
    __SOFTFP__ does not have fenv support.
    
    With this patch the order is now:
    
    sysdeps/unix/sysv/linux/arm/le
    sysdeps/unix/sysv/linux/arm
    sysdeps/arm/nptl
    sysdeps/unix/sysv/linux
    sysdeps/nptlsysdeps/pthread
    sysdeps/gnu
    sysdeps/unix/inet
    sysdeps/unix/sysv
    sysdeps/unix/arm
    sysdeps/unix
    sysdeps/posix
    sysdeps/arm/le/nofpu
    sysdeps/arm/nofpu
    sysdeps/ieee754/soft-fp
    sysdeps/arm/le
    sysdeps/arm
    sysdeps/wordsize-32
    sysdeps/ieee754/flt-32
    sysdeps/ieee754/dbl-64
    sysdeps/ieee754
    sysdeps/generic
    
    Checked on arm-linux-gnuaebi.
    
    (cherry picked from commit af09e5e5d9ec3ca20891e61a6922eac984fcbdc4)

 sysdeps/arm/be/nofpu/Implies | 1 +
 sysdeps/arm/le/nofpu/Implies | 1 +
 2 files changed, 2 insertions(+)

commit 4269086efe5b37a5960c8640032912eacc63725e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 6 09:25:32 2020 -0300

    linux/sysipc: Include linux/posix_types.h for __kernel_mode_t
    
    The posix_types.h (where __kernel_mode_t is defined) is included
    implicitly, which might not happen on older kernels.
    
    (cherry picked from commit 7aec9f4e5e0313772d123ba4daa96ea921a50aec)

 sysdeps/unix/sysv/linux/msgctl.c | 1 +
 sysdeps/unix/sysv/linux/semctl.c | 1 +
 sysdeps/unix/sysv/linux/shmctl.c | 1 +
 3 files changed, 3 insertions(+)

commit 8ea20118cf3bda6255e47266af50f3768d818475
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 3 14:59:13 2020 -0300

    linux: Clear mode_t padding bits (BZ#25623)
    
    The kernel might not clear the padding value for the ipc_perm mode
    fields in compat mode (32 bit running on a 64 bit kernel).  It was
    fixed on v4.14 when the ipc compat code was refactored to move
    (commits 553f770ef71b, 469391684626, c0ebccb6fa1e).
    
    Although it is most likely a kernel issue, it was shown only due
    BZ#18231 fix which made all the SysVIPC mode_t 32-bit regardless of
    the kABI.
    
    This patch fixes it by explicitly zeroing the upper bits for such
    cases.  The __ASSUME_SYSVIPC_BROKEN_MODE_T case already handles
    it with the shift.
    
    (The aarch64 ipc_priv.h is superflous since
    __ASSUME_SYSVIPC_DEFAULT_IPC_64 is now defined as default).
    
    Checked on i686-linux-gnu on 3.10 and on 4.15 kernel.
    
    (cherry picked from commit 82025bad80429c67a4d75f098155b5e02b5112b4)

 sysdeps/unix/sysv/linux/msgctl.c | 9 +++++++--
 sysdeps/unix/sysv/linux/semctl.c | 9 +++++++--
 sysdeps/unix/sysv/linux/shmctl.c | 9 +++++++--
 3 files changed, 21 insertions(+), 6 deletions(-)

commit c74dc7f800e1f1318044e2a670fe2aa17ae06332
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Feb 28 10:46:14 2020 -0300

    i386: Use comdat instead of .gnu.linkonce for i386 setup pic register (BZ #20543)
    
    GCC has moved from using .gnu.linkonce for i386 setup pic register with
    minimum current version (as for binutils minimum binutils that support
    comdat).
    
    Trying to pinpoint when binutils has added comdat support for i686, it
    seems it was around 2004 [1].  I also checking with some ancient
    binutils older than 2.16 I see:
    
    test.o: In function `__x86.get_pc_thunk.bx':
    test.o(.text.__x86.get_pc_thunk.bx+0x0): multiple definition of `__x86.get_pc_thunk.bx'
    /usr/lib/gcc/x86_64-linux-gnu/5/../../../i386-linux-gnu/crti.o(.gnu.linkonce.t.__x86.get_pc_thunk.bx+0x0): first defined here
    
    Which seems that such version can not handle either comdat at all or
    a mix of linkonce and comdat.  For binutils 2.16.1 I am getting a
    different issue trying to link a binary with and more recent
    ctri.o (unrecognized relocation (0x2b) in section `.init', which is
    R_386_GOT32X and old binutils won't generate it anyway).
    
    So I think that either unlikely someone will use an older binutils than
    the one used to glibc and even this scenario may fail with some issue
    as the R_386_GOT32X.  Also, 2.16.1 is quite old and not really supported
    (glibc itself required 2.25).
    
    Checked on i686-linux-gnu.
    
    [1] https://gcc.gnu.org/ml/gcc/2004-05/msg00030.html
    
    (cherry picked from commit 35200fd3892f6caf867bf89bc8048e553906af28)

 sysdeps/i386/sysdep.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

commit 456160845c4f01badeebfd6ca402789cc5af8051
Author: Fangrui Song <maskray@google.com>
Date:   Tue Feb 4 21:55:44 2020 -0800

    Improve IFUNC check [BZ #25506]
    
    GNU ld's RISCV port does not support IFUNC. ld -no-pie produces no
    relocation and the test passed incorrectly. Be more rigid by testing
    IRELATIVE explicitly.
    
    Tested-by: Aurelien Jarno <aurelien@aurel32.net>
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
    (cherry picked from commit 87a698a21646b7ee620923ef5ffa9735471a8ddd)

 configure    | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit a76ee440da578fa7b01321ab95abd9ae46e1b307
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Feb 12 23:31:56 2020 +0000

    Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487).
    
    Bug 25487 reports stack corruption in ldbl-96 sinl on a pseudo-zero
    argument (an representation where all the significand bits, including
    the explicit high bit, are zero, but the exponent is not zero, which
    is not a valid representation for the long double type).
    
    Although this is not a valid long double representation, existing
    practice in this area (see bug 4586, originally marked invalid but
    subsequently fixed) is that we still seek to avoid invalid memory
    accesses as a result, in case of programs that treat arbitrary binary
    data as long double representations, although the invalid
    representations of the ldbl-96 format do not need to be consistently
    handled the same as any particular valid representation.
    
    This patch makes the range reduction detect pseudo-zero and unnormal
    representations that would otherwise go to __kernel_rem_pio2, and
    returns a NaN for them instead of continuing with the range reduction
    process.  (Pseudo-zero and unnormal representations whose unbiased
    exponent is less than -1 have already been safely returned from the
    function before this point without going through the rest of range
    reduction.)  Pseudo-zero representations would previously result in
    the value passed to __kernel_rem_pio2 being all-zero, which is
    definitely unsafe; unnormal representations would previously result in
    a value passed whose high bit is zero, which might well be unsafe
    since that is not a form of input expected by __kernel_rem_pio2.
    
    Tested for x86_64.
    
    (cherry picked from commit 9333498794cde1d5cca518badf79533a24114b6f)

 NEWS                                       |  5 ++++
 sysdeps/ieee754/ldbl-96/Makefile           |  3 ++-
 sysdeps/ieee754/ldbl-96/e_rem_pio2l.c      | 12 +++++++++
 sysdeps/ieee754/ldbl-96/test-sinl-pseudo.c | 41 ++++++++++++++++++++++++++++++
 4 files changed, 60 insertions(+), 1 deletion(-)

commit 8ced05b85c86ab2c1b0a22ffecf701249696b73a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Feb 20 14:37:04 2020 -0300

    malloc/tst-mallocfork2: Kill lingering process for unexpected failures
    
    If the test fails due some unexpected failure after the children
    creation, either in the signal handler by calling abort or in the main
    loop; the created children might not be killed properly.
    
    This patches fixes it by:
    
      * Avoid aborting in the signal handler by setting a flag that
        an error has occured and add a check in the main loop.
    
      * Add a atexit handler to handle kill child processes.
    
    Checked on x86_64-linux-gnu.

 malloc/tst-mallocfork2.c | 39 ++++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 11 deletions(-)

commit b172cb1fc6359ae2b81a5775c6ed5f3945f64f72
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Feb 10 10:32:14 2020 -0300

    riscv: Avoid clobbering register parameters in syscall
    
    The riscv INTERNAL_SYSCALL macro might clobber the register
    parameter if the argument itself might clobber any register (a function
    call for instance).
    
    This patch fixes it by using temporary variables for the expressions
    between the register assignments (as indicated by GCC documentation,
    6.47.5.2 Specifying Registers for Local Variables).
    
    It is similar to the fix done for MIPS (bug 25523).
    
    Checked with riscv64-linux-gnu-rv64imafdc-lp64d build.
    
    (cherry picked from commit be74b42ee2a97009a6cd4fc90126add4a41c583b)

 sysdeps/unix/sysv/linux/riscv/sysdep.h | 84 ++++++++++++++++++++++------------
 1 file changed, 56 insertions(+), 28 deletions(-)

commit 4f4e34407664c01158d761505d0cfcdb50df7429
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Feb 10 10:19:29 2020 -0300

    microblaze: Avoid clobbering register parameters in syscall
    
    The microblaze INTERNAL_SYSCALL macro might clobber the register
    parameter if the argument itself might clobber any register (a function
    call for instance).
    
    This patch fixes it by using temporary variables for the expressions
    between the register assignments (as indicated by GCC documentation,
    6.47.5.2 Specifying Registers for Local Variables).
    
    It is similar to the fix done for MIPS (bug 25523).
    
    Checked with microblaze-linux-gnu and microblazeel-linux-gnu build.
    
    (cherry picked from commit 6cc8fc7c1506e8084d65b078ff5b05a92e17a28a)

 sysdeps/unix/sysv/linux/microblaze/sysdep.h | 91 ++++++++++++++++++-----------
 1 file changed, 56 insertions(+), 35 deletions(-)

commit 2556e5759cc7cc5eac5768720248e027eb8ee6f6
Author: WANG Xuerui <git@xen0n.name>
Date:   Thu Feb 13 00:57:03 2020 +0800

    mips: Fix argument passing for inlined syscalls on Linux [BZ #25523]
    
    According to [gcc documentation][1], temporary variables must be used for
    the desired content to not be call-clobbered.
    
    Fix the Linux inline syscall templates by adding temporary variables,
    much like what x86 did before
    (commit 381a0c26d73e0f074c962e0ab53b99a6c327066d).
    
    Tested with gcc 9.2.0, both cross-compiled and natively on Loongson
    3A4000.
    
    [1]: https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html
    
    (cherry picked from commit 4fbba6fe904d0094ddc4284066b3860d119cbd4a)

 NEWS                                             |  6 +++
 sysdeps/unix/sysv/linux/mips/mips32/sysdep.h     | 30 +++++++----
 sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 63 ++++++++++++++++--------
 sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 63 ++++++++++++++++--------
 4 files changed, 110 insertions(+), 52 deletions(-)

commit c3b331bbadd142ec65ed4164e2dd860a9d22b593
Author: WANG Xuerui <git@xen0n.name>
Date:   Thu Feb 13 00:57:02 2020 +0800

    mips: Use 'long int' and 'long long int' in linux syscall code
    
    Style fixes only, no functional change.
    
    (cherry picked from commit d3fbb18aa3164ca1d11e8acba81e1fc2ca70f43e)

 .../unix/sysv/linux/mips/mips32/mips-syscall5.S    |   6 +-
 .../unix/sysv/linux/mips/mips32/mips-syscall6.S    |   6 +-
 .../unix/sysv/linux/mips/mips32/mips-syscall7.S    |   7 +-
 .../sysv/linux/mips/mips32/mips16/mips16-syscall.h |  64 +++++-----
 .../linux/mips/mips32/mips16/mips16-syscall0.c     |   4 +-
 .../linux/mips/mips32/mips16/mips16-syscall1.c     |   6 +-
 .../linux/mips/mips32/mips16/mips16-syscall2.c     |   6 +-
 .../linux/mips/mips32/mips16/mips16-syscall3.c     |   6 +-
 .../linux/mips/mips32/mips16/mips16-syscall4.c     |   6 +-
 sysdeps/unix/sysv/linux/mips/mips32/sysdep.h       | 135 +++++++++++----------
 sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h   | 100 +++++++--------
 sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h   |  98 +++++++--------
 sysdeps/unix/sysv/linux/mips/mips64/syscall.S      |   2 +-
 sysdeps/unix/sysv/linux/mips/sysdep.h              |   4 +-
 14 files changed, 230 insertions(+), 220 deletions(-)

commit 657773ff525922754f2d8ef1f882fef239ebaacf
Author: Andreas K. Huettel <dilfridge@gentoo.org>
Date:   Sun Mar 22 11:46:02 2020 +0100

    Gentoo: Revert "Gentoo: disable tests that fail only in sandbox"
    
    This reverts commit 80ef1395b745f817507516c3272b8108d58b3089.
    
    Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org>

 elf/Makefile                     | 16 +++++++++++++++-
 io/Makefile                      |  2 +-
 nptl/Makefile                    |  8 ++++----
 posix/Makefile                   |  4 ++--
 resolv/Makefile                  |  2 ++
 sysdeps/unix/sysv/linux/Makefile |  2 +-
 6 files changed, 25 insertions(+), 9 deletions(-)

commit 3de9cef7d5f2b9f8c12c3d05173082780eecd51b
Author: Andreas K. Huettel <dilfridge@gentoo.org>
Date:   Sun Mar 22 11:45:15 2020 +0100

    Gentoo: Revert "Gentoo: support running tests under sandbox"
    
    This reverts commit f30484ad2465667a685964ae62653808bd3f5011.
    
    Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org>

 Makeconfig                  | 2 +-
 iconvdata/run-iconv-test.sh | 2 +-
 nptl/tst-tls6.sh            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

commit 6678a242ef32d4341aafb0d41999376f3973e2bd
Author: Andreas K. Huettel <dilfridge@gentoo.org>
Date:   Sat Mar 21 15:54:14 2020 +0100

    Gentoo: Adapt tests to /etc/mail/alias location
    
    (cherry picked from commit 03fb405d759b9806fa150813f04dfe1aaa658ac6)
    Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org>

 nss/tst-nss-files-alias-leak.c | 18 +++++++++---------
 support/support_chroot.c       |  8 +++++++-
 2 files changed, 16 insertions(+), 10 deletions(-)

commit 1187e423f63420a41a26dcaf02f51803658022f9 (tag: gentoo/glibc-2.31-1)
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Fri Dec 14 20:43:04 2018 +0100

    Gentoo: force -O0 in conform tests to survive $CC changes
    
    In bug #659030 Gentoo started passing user's CFLAGS via $CC variable.
    conform tests should but are not ready to handle -O1/-O2 yet.
    Tests fail to validate headers due to inlining of weak symbol aliases
    and other problems. Let's force it back to -O0 until it's fixed upstream.
    
    Original patch by Sergei, ported to the new python test framework by Andreas
    
    Bug: https://bugs.gentoo.org/659030
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 conform/conformtest.py   | 6 ++++--
 conform/linknamespace.py | 4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

commit e326857c9c9d20dddb93532d83c620c552e873cc
Author: Mike FABIAN <mfabian@redhat.com>
Date:   Mon Aug 10 15:58:12 2015 +0200

    Gentoo: Add a C.UTF-8 locale
    
    Source:
    https://src.fedoraproject.org/rpms/glibc/raw/master/f/glibc-c-utf8-locale.patch
    
    Notes from there:
    This patch needs to upstream as part of Carlos O'Donell
    <carlos@redhat.com>'s work on enabling upstream C.UTF-8 support. This
    work is currently blocked on cleaning up the test results to prove that
    full code-point sorting is working as intended.
    Note that this patch does not provide full code-point sorting as
    expected.
    This patch needs to upstream as soon as possible since it would be nice
    to have this in F29 and fixed.
    
    Further information:
    https://bugzilla.redhat.com/show_bug.cgi?id=902094
    https://sourceware.org/bugzilla/show_bug.cgi?id=17318
    https://bugs.gentoo.org/671024

 localedata/SUPPORTED |   1 +
 localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 239 insertions(+)

commit 8ddc089b03bb592b5843efaebd39b5b58c5684f8
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Mon Oct 22 22:34:13 2018 +0200

    Gentoo: Adapt to Gentoo-specific /etc/mail/aliases
    
    Patch by pacho2
    
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    (cherry picked from commit 4e616cda056f471b799beba2b1cedc787ad4ecc0)

 nss/nss_files/files-alias.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 2de135bf7300c00563af86a214c698036efd3758
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Wed Jan 17 01:02:19 2018 +0100

    Gentoo: Disable test that fails because of the gethostbyname4_r revert

 nss/Makefile | 1 -
 1 file changed, 1 deletion(-)

commit 80ef1395b745f817507516c3272b8108d58b3089
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Mon Sep 11 13:14:46 2017 +0200

    Gentoo: disable tests that fail only in sandbox

 elf/Makefile                     | 16 +---------------
 io/Makefile                      |  2 +-
 nptl/Makefile                    |  8 ++++----
 posix/Makefile                   |  4 ++--
 resolv/Makefile                  |  2 --
 sysdeps/unix/sysv/linux/Makefile |  2 +-
 6 files changed, 9 insertions(+), 25 deletions(-)

commit f3fba18aa321118d146daf826c1a4456b45ed7f8
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Tue Aug 29 22:58:50 2017 +0200

    Revert "        * sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r"
    
    This reverts commit 8479f23aa1d5e5477a37f46823856bdafaedfa46.
    
    See for the background
      https://sourceware.org/bugzilla/show_bug.cgi?id=16826
      https://bugs.gentoo.org/show_bug.cgi?id=600632
    
    This makes test resolv/tst-res_use_inet6 fail. Disable it.
    (cherry picked from commit 06a2a073a2c6fb3e1489af96e125daca248d0a03)

 sysdeps/posix/getaddrinfo.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

commit 0f3c703dab23fa49e93ea2f8c9ed861691f06405
Author: Andreas K. Hüttel <dilfridge@gentoo.org>
Date:   Wed Aug 23 13:26:49 2017 +0200

    [no-patch] Gentoo: Add support files
    
    * Source: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/extra/
    * The make-tarball script has been completely rewritten to work with git.
    * The c-stubs addon has been dropped since the addon mechanism is gone.
    * Updates to the nscd init script, see Gentoo bug 492814
    * Make patchset generation script also work with master
    * locale-gen: suppress ignored error when emptying already empty directory, bug 647188

 scripts/gentoo/README.Gentoo.patches     |  26 ++
 scripts/gentoo/extra/README              |   5 +
 scripts/gentoo/extra/etc/host.conf       |  24 ++
 scripts/gentoo/extra/etc/nscd            |  85 ++++++
 scripts/gentoo/extra/locale/locale-gen   | 444 +++++++++++++++++++++++++++++++
 scripts/gentoo/extra/locale/locale-gen.8 |  69 +++++
 scripts/gentoo/extra/locale/locale.gen   |  36 +++
 scripts/gentoo/extra/locale/locale.gen.5 |  77 ++++++
 scripts/gentoo/make-tarball.sh           | 107 ++++++++
 9 files changed, 873 insertions(+)

commit f30484ad2465667a685964ae62653808bd3f5011
Author: Stephanie J. Lockwood-Childs <wormo@gentoo.org>
Date:   Tue Mar 13 01:57:21 2007 -0400

    Gentoo: support running tests under sandbox
    
    when glibc runs its tests, it does so by invoking the local library loader.
    in Gentoo, we build/run inside of our "sandbox" which itself is linked against
    libdl (so that it can load libraries and pull out symbols).  the trouble
    is that when you upgrade from an older glibc to the new one, often times
    internal symbols change name or abi.  this is normally OK as you cannot use
    libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
    we always say "keep all of the glibc libraries from the same build".  but
    when glibc runs its tests, it uses dynamic paths to point to its new local
    copies of libraries.  if the test doesnt use libdl, then glibc doesnt add
    its path, and when sandbox triggers the loading of libdl, glibc does so
    from the host system system.  this gets us into the case of all libraries
    are from the locally compiled version of glibc except for libdl.so.
    
    http://bugs.gentoo.org/56898

 Makeconfig                  | 2 +-
 iconvdata/run-iconv-test.sh | 2 +-
 nptl/tst-tls6.sh            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

commit c5a3849080d62b90aa346f677cd0fa6877ef5132
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Wed Apr 1 02:15:48 2009 -0400

    Gentoo: disable ldconfig during install
    
    Do not bother running ldconfig on DESTDIR.  It's a waste of time as we
    won't use the result (portage will rebuild the cache after install).
    Also, the Gentoo sandbox does not currently catch chroot() behavior so
    we end up (incorrectly) flagging it as a violation as a write to /etc.
    
    http://sourceware.org/ml/libc-alpha/2012-08/msg00118.html
    https://bugs.gentoo.org/431038

 Makefile | 1 +
 1 file changed, 1 insertion(+)
