[v5,12/13] string: Add sigabbrev_np and sigdescr_np

Message ID 20200619134352.297146-12-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • [v5,01/13] signal: Add signum-{generic,arch}.h
Related show

Commit Message

Adhemerval Zanella via Libc-alpha June 19, 2020, 1:43 p.m.
The sigabbrev_np returns the abbreviated signal name (i.g. "HUP" for
SIGHUP) while sigdescr_np returns string describing error number
(i.g "Hangup" for SIGHUP).  Different than strsignal, sigdescr_np
does not attempt to translate the return description and both
functions return NULL for an invalid signal number.

They should be used instead of sys_siglist or sys_sigabbrev and they
are both thread and async-signal safe.  They are added as GNU
extensions on string.h header (same as strsignal).

Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
and s390x-linux-gnu.
---
 NEWS                                          | 10 ++++
 include/signal.h                              |  3 +-
 include/string.h                              |  3 ++
 manual/signal.texi                            | 24 +++++++++
 stdio-common/siglist.c                        |  1 +
 string/Makefile                               |  6 ++-
 string/Versions                               |  3 ++
 string/sigabbrev_np.c                         | 33 ++++++++++++
 string/sigdescr_np.c                          | 34 +++++++++++++
 string/string.h                               |  8 +++
 string/strsignal.c                            |  9 +---
 string/test-sig_np.c                          | 51 +++++++++++++++++++
 sysdeps/mach/hurd/i386/libc.abilist           |  2 +
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  2 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |  2 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  2 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  2 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  2 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  2 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  2 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |  2 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |  2 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  2 +
 .../sysv/linux/microblaze/be/libc.abilist     |  2 +
 .../sysv/linux/microblaze/le/libc.abilist     |  2 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  2 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  2 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  2 +
 .../sysv/linux/mips/mips64/n64/libc.abilist   |  2 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |  2 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  2 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |  2 +
 .../linux/powerpc/powerpc64/be/libc.abilist   |  2 +
 .../linux/powerpc/powerpc64/le/libc.abilist   |  2 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |  2 +
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  2 +
 .../unix/sysv/linux/s390/s390-64/libc.abilist |  2 +
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  2 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  2 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |  2 +
 .../sysv/linux/sparc/sparc64/libc.abilist     |  2 +
 .../unix/sysv/linux/x86_64/64/libc.abilist    |  2 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |  2 +
 43 files changed, 237 insertions(+), 10 deletions(-)
 create mode 100644 string/sigabbrev_np.c
 create mode 100644 string/sigdescr_np.c
 create mode 100644 string/test-sig_np.c

-- 
2.25.1

Comments

Adhemerval Zanella via Libc-alpha July 2, 2020, 9:13 p.m. | #1
On 6/19/20 9:43 AM, Adhemerval Zanella wrote:
> The sigabbrev_np returns the abbreviated signal name (i.g. "HUP" for

> SIGHUP) while sigdescr_np returns string describing error number


s/returns string/returns the string/g
s/ error/ the error/g

> (i.g "Hangup" for SIGHUP).  Different than strsignal, sigdescr_np

> does not attempt to translate the return description and both

> functions return NULL for an invalid signal number.

> 

> They should be used instead of sys_siglist or sys_sigabbrev and they

> are both thread and async-signal safe.  They are added as GNU

> extensions on string.h header (same as strsignal).


These are perfect functions to use in place of sys_siglist and
sys_sigabbrev. Thus we now have functions to access the old data in
a way that avoids exposing the data to COPY relocations (and the
size encoded in that ABI). Thanks for fixing this up.
 
> Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,

> and s390x-linux-gnu.


OK for master if you accept the manual suggestions and commit message
changes.

No regressions on x86_64 and i686.

Tested-by: Carlos O'Donell <carlos@redhat.com>

Reviewed-by: Carlos O'Donell <carlos@redhat.com>


> ---

>  NEWS                                          | 10 ++++

>  include/signal.h                              |  3 +-

>  include/string.h                              |  3 ++

>  manual/signal.texi                            | 24 +++++++++

>  stdio-common/siglist.c                        |  1 +

>  string/Makefile                               |  6 ++-

>  string/Versions                               |  3 ++

>  string/sigabbrev_np.c                         | 33 ++++++++++++

>  string/sigdescr_np.c                          | 34 +++++++++++++

>  string/string.h                               |  8 +++

>  string/strsignal.c                            |  9 +---

>  string/test-sig_np.c                          | 51 +++++++++++++++++++

>  sysdeps/mach/hurd/i386/libc.abilist           |  2 +

>  sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  2 +

>  sysdeps/unix/sysv/linux/alpha/libc.abilist    |  2 +

>  sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  2 +

>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  2 +

>  sysdeps/unix/sysv/linux/csky/libc.abilist     |  2 +

>  sysdeps/unix/sysv/linux/hppa/libc.abilist     |  2 +

>  sysdeps/unix/sysv/linux/i386/libc.abilist     |  2 +

>  sysdeps/unix/sysv/linux/ia64/libc.abilist     |  2 +

>  .../sysv/linux/m68k/coldfire/libc.abilist     |  2 +

>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  2 +

>  .../sysv/linux/microblaze/be/libc.abilist     |  2 +

>  .../sysv/linux/microblaze/le/libc.abilist     |  2 +

>  .../sysv/linux/mips/mips32/fpu/libc.abilist   |  2 +

>  .../sysv/linux/mips/mips32/nofpu/libc.abilist |  2 +

>  .../sysv/linux/mips/mips64/n32/libc.abilist   |  2 +

>  .../sysv/linux/mips/mips64/n64/libc.abilist   |  2 +

>  sysdeps/unix/sysv/linux/nios2/libc.abilist    |  2 +

>  .../linux/powerpc/powerpc32/fpu/libc.abilist  |  2 +

>  .../powerpc/powerpc32/nofpu/libc.abilist      |  2 +

>  .../linux/powerpc/powerpc64/be/libc.abilist   |  2 +

>  .../linux/powerpc/powerpc64/le/libc.abilist   |  2 +

>  .../unix/sysv/linux/riscv/rv64/libc.abilist   |  2 +

>  .../unix/sysv/linux/s390/s390-32/libc.abilist |  2 +

>  .../unix/sysv/linux/s390/s390-64/libc.abilist |  2 +

>  sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  2 +

>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  2 +

>  .../sysv/linux/sparc/sparc32/libc.abilist     |  2 +

>  .../sysv/linux/sparc/sparc64/libc.abilist     |  2 +

>  .../unix/sysv/linux/x86_64/64/libc.abilist    |  2 +

>  .../unix/sysv/linux/x86_64/x32/libc.abilist   |  2 +

>  43 files changed, 237 insertions(+), 10 deletions(-)

>  create mode 100644 string/sigabbrev_np.c

>  create mode 100644 string/sigdescr_np.c

>  create mode 100644 string/test-sig_np.c

> 

> diff --git a/NEWS b/NEWS

> index ec39b6e056..f504772eb6 100644

> --- a/NEWS

> +++ b/NEWS

> @@ -31,6 +31,16 @@ Major new features:

>    pthread_attr_getsigmask_np have been added.  They allow applications

>    to specify the signal mask of a thread created with pthread_create.

>  

> +* The functions sigabbrev_np and sigdescr_np have been added.  The

> +  sigabbrev_np returns the abbreviated signal name (i.g. "HUP" for SIGHUP)

> +  while sigdescr_np returns string describing signal number (i.g "Hangup"


s/returns string/returns a string/g
s/ signal/ the signal/g

> +  for SIGHUP).  Different than strsignal, sigdescr_np does not attempt

> +  to translate the return description and both functions return NULL for

> +  an invalid signal number.

> +

> +  They should be used instead of sys_siglist or sys_sigabbrev and they

> +  are both thread and async-signal safe.  These functions are GNU extensions.


OK.

> +

>  Deprecated and removed features, and other changes affecting compatibility:

>  

>  * The deprecated <sys/sysctl.h> header and the sysctl function have been

> diff --git a/include/signal.h b/include/signal.h

> index 3d6315b741..b4ee02d153 100644

> --- a/include/signal.h

> +++ b/include/signal.h

> @@ -16,7 +16,8 @@ libc_hidden_proto (__libc_current_sigrtmin)

>  libc_hidden_proto (__libc_current_sigrtmax)

>  extern const char * const __sys_siglist[_NSIG];

>  libc_hidden_proto (__sys_siglist)

> -

> +extern const char * const __sys_sigabbrev[_NSIG];

> +libc_hidden_proto (__sys_sigabbrev)


OK.

>  

>  /* Now define the internal interfaces.  */

>  extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);

> diff --git a/include/string.h b/include/string.h

> index ce01ad8254..f4ce138622 100644

> --- a/include/string.h

> +++ b/include/string.h

> @@ -53,6 +53,9 @@ extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);

>  

>  extern char *__strerror_l (int __errnum, locale_t __loc);

>  

> +extern const char *__sigdescr_np (int __errnum);

> +libc_hidden_proto (__sigdescr_np)


OK.

> +

>  /* Get _STRING_ARCH_unaligned.  */

>  #include <string_private.h>

>  #endif

> diff --git a/manual/signal.texi b/manual/signal.texi

> index 34def1c06c..a19dff85f8 100644

> --- a/manual/signal.texi

> +++ b/manual/signal.texi

> @@ -880,6 +880,30 @@ to @var{signum}.

>  This function is a BSD feature, declared in the header file @file{signal.h}.

>  @end deftypefun

>  

> +@deftypefun void sigdescr_np (int @var{signum})

> +@standards{GNU, string.h}

> +@safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}


Use @mtsafe{}, because the function does not touch _sigintr at all.

> +This function returns the message describing the signal @var{signum} or

> +@code{NULL} for invalid signal number (i.g "Hangup" for @code{SIGHUP}).


s/i.g/e.g./g

> +Different than @code{strsignal} the returned description is not translated.

> +The message porints to a static storage whose lifetime is the whole lifetime


s/porints/points/g

> +of the program.

> +

> +@pindex string.h

> +This function is a GNU extension, declared in the header file @file{string.h}.

> +@end deftypefun

> +

> +@deftypefun void sigabbrev_np (int @var{signum})

> +@standards{GNU, string.h}

> +@safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}


Use @mtsafe{}, because the function does not touch _sigintr at all.

> +This function returns the abbreviation describing the signal @var{signum} or

> +@code{NULL} for invalid signal number.  The message porints to a static


s/porints/points/g

> +storage whose lifetime is the whole lifetime of the program.

> +

> +@pindex string.h

> +This function is a GNU extension, declared in the header file @file{string.h}.

> +@end deftypefun

> +

>  @node Signal Actions

>  @section Specifying Signal Actions

>  @cindex signal actions

> diff --git a/stdio-common/siglist.c b/stdio-common/siglist.c

> index 3e29aa8227..6b020262b2 100644

> --- a/stdio-common/siglist.c

> +++ b/stdio-common/siglist.c

> @@ -34,5 +34,6 @@ const char *const __sys_sigabbrev[NSIG] =

>  #include <siglist.h>

>  #undef init_sig

>  };

> +libc_hidden_def (__sys_sigabbrev)


OK.

>  

>  #include <siglist-compat.c>

> diff --git a/string/Makefile b/string/Makefile

> index 73e5ac2ebe..e5075521b7 100644

> --- a/string/Makefile

> +++ b/string/Makefile

> @@ -44,7 +44,8 @@ routines	:= strcat strchr strcmp strcoll strcpy strcspn		\

>  				     addsep replace)			\

>  		   envz basename					\

>  		   strcoll_l strxfrm_l string-inlines memrchr		\

> -		   xpg-strerror strerror_l explicit_bzero

> +		   xpg-strerror strerror_l explicit_bzero		\

> +		   sigdescr_np sigabbrev_np


OK.

>  

>  strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\

>  		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\

> @@ -60,7 +61,8 @@ tests		:= tester inl-tester noinl-tester testcopy test-ffs	\

>  		   bug-envz1 tst-strxfrm2 tst-endian tst-svc2		\

>  		   tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt	\

>  		   test-endian-types test-endian-file-scope		\

> -		   test-endian-sign-conversion tst-memmove-overflow

> +		   test-endian-sign-conversion tst-memmove-overflow	\

> +		   test-sig_np


OK.

>  

>  # This test allocates a lot of memory and can run for a long time.

>  xtests = tst-strcoll-overflow

> diff --git a/string/Versions b/string/Versions

> index 9b709d12a9..6f8dd2d372 100644

> --- a/string/Versions

> +++ b/string/Versions

> @@ -85,4 +85,7 @@ libc {

>    GLIBC_2.25 {

>      explicit_bzero;

>    }

> +  GLIBC_2.32 {

> +    sigdescr_np; sigabbrev_np;

> +  }


OK.

>  }

> diff --git a/string/sigabbrev_np.c b/string/sigabbrev_np.c

> new file mode 100644

> index 0000000000..3cbe14e769

> --- /dev/null

> +++ b/string/sigabbrev_np.c

> @@ -0,0 +1,33 @@

> +/* Return string describing signal abbreviation.

> +   Copyright (C) 2020 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

> +   <https://www.gnu.org/licenses/>.  */

> +

> +#include <string.h>

> +#include <signal.h>

> +#include <array_length.h>

> +

> +const char *const

> +sigabbrev_np (int signum)

> +{

> +  const char *abbrev = NULL;

> +

> +  if (signum >= 0 && signum <= NSIG

> +      && signum < array_length (__sys_sigabbrev))

> +    abbrev = __sys_sigabbrev[signum];

> +

> +  return abbrev;

> +}


OK.

> diff --git a/string/sigdescr_np.c b/string/sigdescr_np.c

> new file mode 100644

> index 0000000000..5bcf814c1d

> --- /dev/null

> +++ b/string/sigdescr_np.c

> @@ -0,0 +1,34 @@

> +/* Return string describing signal.

> +   Copyright (C) 2020 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

> +   <https://www.gnu.org/licenses/>.  */

> +

> +#include <string.h>

> +#include <signal.h>

> +#include <array_length.h>

> +

> +const char *const

> +__sigdescr_np (int signum)

> +{

> +  const char *descr = NULL;

> +

> +  if (signum >= 0 && signum <= NSIG && signum < array_length (__sys_siglist))

> +    descr = __sys_siglist[signum];

> +

> +  return descr;

> +}


OK.

> +libc_hidden_def (__sigdescr_np)

> +weak_alias (__sigdescr_np, sigdescr_np)

> diff --git a/string/string.h b/string/string.h

> index d7ce0f4a1b..0119d7f45d 100644

> --- a/string/string.h

> +++ b/string/string.h

> @@ -454,6 +454,14 @@ extern char *strsep (char **__restrict __stringp,

>  /* Return a string describing the meaning of the signal number in SIG.  */

>  extern char *strsignal (int __sig) __THROW;

>  

> +# ifdef __USE_GNU

> +/* Return an abbreviation string for the signal number SIG.  */

> +extern const char *sigabbrev_np (int __sig) __THROW;

> +/* Return a string describing the meaning of the signal number in SIG,

> +   the result is not translated.  */

> +extern const char *sigdescr_np (int __sig) __THROW;

> +# endif

> +


OK.

>  /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST.  */

>  extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)

>       __THROW __nonnull ((1, 2));

> diff --git a/string/strsignal.c b/string/strsignal.c

> index 701ce20e6e..a9b911ce6e 100644

> --- a/string/strsignal.c

> +++ b/string/strsignal.c

> @@ -21,19 +21,14 @@

>  #include <string.h>

>  #include <libintl.h>

>  #include <tls-internal.h>

> -#include <array_length.h>

>  

>  /* Return a string describing the meaning of the signal number SIGNUM.  */

>  char *

>  strsignal (int signum)

>  {

> -  const char *desc = NULL;

> -

> -  if (signum >= 0 && signum <= NSIG && signum < array_length (__sys_siglist))

> -    desc = __sys_siglist[signum];

> -

> +  const char *desc = __sigdescr_np (signum);


OK.

>    if (desc != NULL)

> -    return (char *) _(desc);

> +    return _(desc);


OK.

>  

>    struct tls_internal_t *tls_internal = __glibc_tls_internal ();

>    free (tls_internal->strsignal_buf);

> diff --git a/string/test-sig_np.c b/string/test-sig_np.c

> new file mode 100644

> index 0000000000..8b5117050c

> --- /dev/null

> +++ b/string/test-sig_np.c

> @@ -0,0 +1,51 @@

> +/* Test and sigabbrev_np and sigdescr_np.

> +   Copyright (C) 2020 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

> +   <https://www.gnu.org/licenses/>.  */

> +

> +#include <string.h>

> +#include <signal.h>

> +#include <array_length.h>

> +

> +#include <support/support.h>

> +#include <support/check.h>

> +

> +static const struct test_t

> +{

> +  int errno;

> +  const char *abbrev;

> +  const char *descr;

> +} tests[] =

> +{

> +#define N_(name)                      name

> +#define init_sig(sig, abbrev, desc)   { sig, abbrev, desc },

> +#include <siglist.h>

> +#undef init_sig

> +};

> +

> +static int

> +do_test (void)

> +{

> +  for (size_t i = 0; i < array_length (tests); i++)

> +    {

> +      TEST_COMPARE_STRING (sigabbrev_np (tests[i].errno), tests[i].abbrev);

> +      TEST_COMPARE_STRING (sigdescr_np (tests[i].errno), tests[i].descr);

> +    }

> +

> +  return 0;

> +}

> +

> +#include <support/test-driver.c>


OK.

> diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist

> index 60696d827f..ff8ad98d03 100644

> --- a/sysdeps/mach/hurd/i386/libc.abilist

> +++ b/sysdeps/mach/hurd/i386/libc.abilist

> @@ -2182,6 +2182,8 @@ GLIBC_2.3.4 xdr_quad_t F

>  GLIBC_2.3.4 xdr_u_quad_t F

>  GLIBC_2.30 twalk_r F

>  GLIBC_2.32 mach_print F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.32 thrd_current F

>  GLIBC_2.32 thrd_equal F

>  GLIBC_2.32 thrd_sleep F

> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist

> index 48c790b15d..bb6045d8a6 100644

> --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist

> @@ -2155,3 +2155,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist

> index cb70cb974f..8e15a58eaf 100644

> --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist

> @@ -2237,6 +2237,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _IO_fprintf F

>  GLIBC_2.4 _IO_printf F

>  GLIBC_2.4 _IO_sprintf F

> diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist

> index 573eca117e..ce82b840e8 100644

> --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist

> @@ -139,6 +139,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _Exit F

>  GLIBC_2.4 _IO_2_1_stderr_ D 0xa0

>  GLIBC_2.4 _IO_2_1_stdin_ D 0xa0

> diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist

> index 8a8633f0a4..c7a436cd42 100644

> --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist

> @@ -136,6 +136,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _Exit F

>  GLIBC_2.4 _IO_2_1_stderr_ D 0xa0

>  GLIBC_2.4 _IO_2_1_stdin_ D 0xa0

> diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist

> index 3042a93084..7f51d47b2f 100644

> --- a/sysdeps/unix/sysv/linux/csky/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist

> @@ -2099,3 +2099,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist

> index a02a576321..053cda00a4 100644

> --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist

> @@ -2058,6 +2058,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist

> index f0b9c9e070..f18de50f9e 100644

> --- a/sysdeps/unix/sysv/linux/i386/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist

> @@ -2224,6 +2224,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist

> index 1534fd7a24..a1966cac5a 100644

> --- a/sysdeps/unix/sysv/linux/ia64/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist

> @@ -2090,6 +2090,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist

> index 9a0ada4b52..8f44bc9231 100644

> --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist

> @@ -140,6 +140,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _Exit F

>  GLIBC_2.4 _IO_2_1_stderr_ D 0x98

>  GLIBC_2.4 _IO_2_1_stdin_ D 0x98

> diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist

> index 333c35bf16..088f2fa0f2 100644

> --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist

> @@ -2170,6 +2170,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist

> index 824eceec11..34c1c4fdca 100644

> --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist

> @@ -2150,3 +2150,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist

> index 5a6dcdd21b..099d51e893 100644

> --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist

> @@ -2147,3 +2147,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist

> index 6e5dbb28f1..ea86646c3b 100644

> --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist

> @@ -2141,6 +2141,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist

> index 3ee64614b2..9adac43e36 100644

> --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist

> @@ -2139,6 +2139,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist

> index dc62615524..c42c093cfb 100644

> --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist

> @@ -2147,6 +2147,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist

> index 8cf78bcf51..605e60a35e 100644

> --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist

> @@ -2141,6 +2141,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist

> index 7817aeb0e2..7a57babca5 100644

> --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist

> @@ -2188,3 +2188,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist

> index ca04e8f2d3..c3745c3733 100644

> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist

> @@ -2197,6 +2197,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _IO_fprintf F

>  GLIBC_2.4 _IO_printf F

>  GLIBC_2.4 _IO_sprintf F

> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist

> index 10cb895639..719512e999 100644

> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist

> @@ -2230,6 +2230,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _IO_fprintf F

>  GLIBC_2.4 _IO_printf F

>  GLIBC_2.4 _IO_sprintf F

> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist

> index 96ddc448d7..3f79daa39c 100644

> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist

> @@ -2060,6 +2060,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _IO_fprintf F

>  GLIBC_2.4 _IO_printf F

>  GLIBC_2.4 _IO_sprintf F

> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist

> index deddb53d83..af1a2ae8a6 100644

> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist

> @@ -2350,3 +2350,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist

> index 58217dcb13..ff5b64c1dd 100644

> --- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist

> @@ -2117,3 +2117,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist

> index c22c29b35a..576caca63c 100644

> --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist

> @@ -2195,6 +2195,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _IO_fprintf F

>  GLIBC_2.4 _IO_printf F

>  GLIBC_2.4 _IO_sprintf F

> diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist

> index 568f1727c4..7201b10288 100644

> --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist

> @@ -2096,6 +2096,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _IO_fprintf F

>  GLIBC_2.4 _IO_printf F

>  GLIBC_2.4 _IO_sprintf F

> diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist

> index d9988dae90..4f954ac7ee 100644

> --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist

> @@ -2065,6 +2065,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist

> index 39edeffe82..9db9ba5cc0 100644

> --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist

> @@ -2062,6 +2062,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist

> index 8668e15e8c..ecb54db317 100644

> --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist

> @@ -2186,6 +2186,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 _IO_fprintf F

>  GLIBC_2.4 _IO_printf F

>  GLIBC_2.4 _IO_sprintf F

> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist

> index eb884afa3e..74bd6efed8 100644

> --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist

> @@ -2113,6 +2113,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist

> index a208fb3556..50e45a43e8 100644

> --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist

> @@ -2071,6 +2071,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

>  GLIBC_2.4 __confstr_chk F

>  GLIBC_2.4 __fgets_chk F

>  GLIBC_2.4 __fgets_unlocked_chk F

> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist

> index 3eca3493e2..59b26b097d 100644

> --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist

> +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist

> @@ -2168,3 +2168,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F

>  GLIBC_2.32 pthread_getaffinity_np F

>  GLIBC_2.32 pthread_getattr_np F

>  GLIBC_2.32 pthread_sigmask F

> +GLIBC_2.32 sigabbrev_np F

> +GLIBC_2.32 sigdescr_np F

> 


OK.

-- 
Cheers,
Carlos.
Adhemerval Zanella via Libc-alpha July 3, 2020, 8:23 p.m. | #2
On 02/07/2020 18:13, Carlos O'Donell wrote:
> On 6/19/20 9:43 AM, Adhemerval Zanella wrote:

>> The sigabbrev_np returns the abbreviated signal name (i.g. "HUP" for

>> SIGHUP) while sigdescr_np returns string describing error number

> 

> s/returns string/returns the string/g

> s/ error/ the error/g


Ack.

> 

>> (i.g "Hangup" for SIGHUP).  Different than strsignal, sigdescr_np

>> does not attempt to translate the return description and both

>> functions return NULL for an invalid signal number.

>>

>> They should be used instead of sys_siglist or sys_sigabbrev and they

>> are both thread and async-signal safe.  They are added as GNU

>> extensions on string.h header (same as strsignal).

> 

> These are perfect functions to use in place of sys_siglist and

> sys_sigabbrev. Thus we now have functions to access the old data in

> a way that avoids exposing the data to COPY relocations (and the

> size encoded in that ABI). Thanks for fixing this up.

>  

>> Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,

>> and s390x-linux-gnu.

> 

> OK for master if you accept the manual suggestions and commit message

> changes.


Done, I also extended a bit the release wiki with a simple example on
how to use these interfaces.

> 

> No regressions on x86_64 and i686.

> 

> Tested-by: Carlos O'Donell <carlos@redhat.com>

> Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> 


>>

>> diff --git a/NEWS b/NEWS

>> index ec39b6e056..f504772eb6 100644

>> --- a/NEWS

>> +++ b/NEWS

>> @@ -31,6 +31,16 @@ Major new features:

>>    pthread_attr_getsigmask_np have been added.  They allow applications

>>    to specify the signal mask of a thread created with pthread_create.

>>  

>> +* The functions sigabbrev_np and sigdescr_np have been added.  The

>> +  sigabbrev_np returns the abbreviated signal name (i.g. "HUP" for SIGHUP)

>> +  while sigdescr_np returns string describing signal number (i.g "Hangup"

> 

> s/returns string/returns a string/g

> s/ signal/ the signal/g


Ack.

> 

>> +  for SIGHUP).  Different than strsignal, sigdescr_np does not attempt

>> +  to translate the return description and both functions return NULL for

>> +  an invalid signal number.

>> +

>> +  They should be used instead of sys_siglist or sys_sigabbrev and they

>> +  are both thread and async-signal safe.  These functions are GNU extensions.

> 

> OK.

> 

>> +

>>  Deprecated and removed features, and other changes affecting compatibility:

>>  

>>  * The deprecated <sys/sysctl.h> header and the sysctl function have been

>> diff --git a/include/signal.h b/include/signal.h

>> index 3d6315b741..b4ee02d153 100644

>> --- a/include/signal.h

>> +++ b/include/signal.h

>> @@ -16,7 +16,8 @@ libc_hidden_proto (__libc_current_sigrtmin)

>>  libc_hidden_proto (__libc_current_sigrtmax)

>>  extern const char * const __sys_siglist[_NSIG];

>>  libc_hidden_proto (__sys_siglist)

>> -

>> +extern const char * const __sys_sigabbrev[_NSIG];

>> +libc_hidden_proto (__sys_sigabbrev)

> 

> OK.

> 

>>  

>>  /* Now define the internal interfaces.  */

>>  extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);

>> diff --git a/include/string.h b/include/string.h

>> index ce01ad8254..f4ce138622 100644

>> --- a/include/string.h

>> +++ b/include/string.h

>> @@ -53,6 +53,9 @@ extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);

>>  

>>  extern char *__strerror_l (int __errnum, locale_t __loc);

>>  

>> +extern const char *__sigdescr_np (int __errnum);

>> +libc_hidden_proto (__sigdescr_np)

> 

> OK.

> 

>> +

>>  /* Get _STRING_ARCH_unaligned.  */

>>  #include <string_private.h>

>>  #endif

>> diff --git a/manual/signal.texi b/manual/signal.texi

>> index 34def1c06c..a19dff85f8 100644

>> --- a/manual/signal.texi

>> +++ b/manual/signal.texi

>> @@ -880,6 +880,30 @@ to @var{signum}.

>>  This function is a BSD feature, declared in the header file @file{signal.h}.

>>  @end deftypefun

>>  

>> +@deftypefun void sigdescr_np (int @var{signum})

>> +@standards{GNU, string.h}

>> +@safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}

> 

> Use @mtsafe{}, because the function does not touch _sigintr at all.


Ack.

> 

>> +This function returns the message describing the signal @var{signum} or

>> +@code{NULL} for invalid signal number (i.g "Hangup" for @code{SIGHUP}).

> 

> s/i.g/e.g./g


Ack.

> 

>> +Different than @code{strsignal} the returned description is not translated.

>> +The message porints to a static storage whose lifetime is the whole lifetime

> 

> s/porints/points/g


ACk.

> 

>> +of the program.

>> +

>> +@pindex string.h

>> +This function is a GNU extension, declared in the header file @file{string.h}.

>> +@end deftypefun

>> +

>> +@deftypefun void sigabbrev_np (int @var{signum})

>> +@standards{GNU, string.h}

>> +@safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}

> 

> Use @mtsafe{}, because the function does not touch _sigintr at all.


Ack.

> 

>> +This function returns the abbreviation describing the signal @var{signum} or

>> +@code{NULL} for invalid signal number.  The message porints to a static

> 

> s/porints/points/g


Ack.
Tamar Christina July 8, 2020, 11:18 a.m. | #3
Sorry, also forwarding to mailing list.

For some reason client drops it from CC when I do reply-all..

> -----Original Message-----

> From: Tamar Christina

> Sent: Wednesday, July 8, 2020 12:16 PM

> To: Adhemerval Zanella <adhemerval.zanella@linaro.org>; Carlos O'Donell

> <carlos@redhat.com>

> Subject: RE: [PATCH v5 12/13] string: Add sigabbrev_np and sigdescr_np

> 

> Hi,

> 

> This commit seems to have broken the aarch64 build:

> 

>   sigdescr_np.c:24:1: error: conflicting types for ‘__sigdescr_np’

>    __sigdescr_np (int signum)

>    ^~~~~~~~~~~~~

> 

>   In file included from <command-line>:0:0:

>   ../include/string.h:57:20: note: previous declaration of ‘__sigdescr_np’ was

> here

>    libc_hidden_proto (__sigdescr_np)

>                       ^

>   ./../include/libc-symbols.h:605:33: note: in definition of macro

> ‘__hidden_proto’

>      extern thread __typeof (name) name __hidden_proto_hiddenattr (attrs);

>                                    ^~~~

> 

>   ./../include/libc-symbols.h:624:44: note: in expansion of macro

> ‘hidden_proto’

>    # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)

>                                               ^~~~~~~~~~~~

>   ../include/string.h:57:1: note: in expansion of macro ‘libc_hidden_proto’

>    libc_hidden_proto (__sigdescr_np)

>    ^~~~~~~~~~~~~~~~~

> 

>   In file included from <command-line>:0:0:

>   ../o-iterator.mk:9: recipe for target '/home/teamcity-

> agent/work/fcc7c27539f88edf/build/string/sigdescr_np.o' failed

>   sigdescr_np.c:34:28: error: conflicting types for ‘sigdescr_np’

>    weak_alias (__sigdescr_np, sigdescr_np)

>                               ^

>   ./../include/libc-symbols.h:152:26: note: in definition of macro ‘_weak_alias’

>      extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)))

> \

>                             ^~~~~~~~~

>   sigdescr_np.c:34:1: note: in expansion of macro ‘weak_alias’

>    weak_alias (__sigdescr_np, sigdescr_np)

>    ^~~~~~~~~~

>   In file included from ../include/string.h:63:0,

>                    from sigdescr_np.c:19:

>   ../string/string.h:469:20: note: previous declaration of ‘sigdescr_np’ was

> here

>    extern const char *sigdescr_np (int __sig) __THROW;

>                       ^~~~~~~~~~~

>   make[2]: *** [/home/teamcity-

> agent/work/fcc7c27539f88edf/build/string/sigdescr_np.o] Error 1

>   make[2]: *** Waiting for unfinished jobs....

>   sigabbrev_np.c:24:1: error: conflicting types for ‘sigabbrev_np’

>    sigabbrev_np (int signum)

>    ^~~~~~~~~~~~

>   In file included from ../include/string.h:63:0,

>                    from sigabbrev_np.c:19:

>   ../string/string.h:466:20: note: previous declaration of ‘sigabbrev_np’ was

> here

>    extern const char *sigabbrev_np (int __sig) __THROW;

>                       ^~~~~~~~~~~~

> 

> I'm afraid I don't know glibc internals well enough to know what the right fix

> is here...

> 

> Thanks,

> Tamar

> 

> > -----Original Message-----

> > From: Libc-alpha <libc-alpha-bounces@sourceware.org> On Behalf Of

> > Adhemerval Zanella via Libc-alpha

> > Sent: Friday, July 3, 2020 9:24 PM

> > To: Carlos O'Donell <carlos@redhat.com>; libc-alpha@sourceware.org

> > Subject: Re: [PATCH v5 12/13] string: Add sigabbrev_np and sigdescr_np

> >

> >

> >

> > On 02/07/2020 18:13, Carlos O'Donell wrote:

> > > On 6/19/20 9:43 AM, Adhemerval Zanella wrote:

> > >> The sigabbrev_np returns the abbreviated signal name (i.g. "HUP"

> > >> for

> > >> SIGHUP) while sigdescr_np returns string describing error number

> > >

> > > s/returns string/returns the string/g s/ error/ the error/g

> >

> > Ack.

> >

> > >

> > >> (i.g "Hangup" for SIGHUP).  Different than strsignal, sigdescr_np

> > >> does not attempt to translate the return description and both

> > >> functions return NULL for an invalid signal number.

> > >>

> > >> They should be used instead of sys_siglist or sys_sigabbrev and

> > >> they are both thread and async-signal safe.  They are added as GNU

> > >> extensions on string.h header (same as strsignal).

> > >

> > > These are perfect functions to use in place of sys_siglist and

> > > sys_sigabbrev. Thus we now have functions to access the old data in

> > > a way that avoids exposing the data to COPY relocations (and the

> > > size encoded in that ABI). Thanks for fixing this up.

> > >

> > >> Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,

> > >> and s390x-linux-gnu.

> > >

> > > OK for master if you accept the manual suggestions and commit

> > > message changes.

> >

> > Done, I also extended a bit the release wiki with a simple example on

> > how to use these interfaces.

> >

> > >

> > > No regressions on x86_64 and i686.

> > >

> > > Tested-by: Carlos O'Donell <carlos@redhat.com>

> > > Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> > >

> >

> > >>

> > >> diff --git a/NEWS b/NEWS

> > >> index ec39b6e056..f504772eb6 100644

> > >> --- a/NEWS

> > >> +++ b/NEWS

> > >> @@ -31,6 +31,16 @@ Major new features:

> > >>    pthread_attr_getsigmask_np have been added.  They allow

> applications

> > >>    to specify the signal mask of a thread created with pthread_create.

> > >>

> > >> +* The functions sigabbrev_np and sigdescr_np have been added.  The

> > >> +  sigabbrev_np returns the abbreviated signal name (i.g. "HUP" for

> > >> +SIGHUP)

> > >> +  while sigdescr_np returns string describing signal number (i.g

> "Hangup"

> > >

> > > s/returns string/returns a string/g

> > > s/ signal/ the signal/g

> >

> > Ack.

> >

> > >

> > >> +  for SIGHUP).  Different than strsignal, sigdescr_np does not

> > >> + attempt  to translate the return description and both functions

> > >> + return NULL for  an invalid signal number.

> > >> +

> > >> +  They should be used instead of sys_siglist or sys_sigabbrev and

> > >> + they  are both thread and async-signal safe.  These functions are

> > >> + GNU

> > extensions.

> > >

> > > OK.

> > >

> > >> +

> > >>  Deprecated and removed features, and other changes affecting

> > compatibility:

> > >>

> > >>  * The deprecated <sys/sysctl.h> header and the sysctl function

> > >> have been diff --git a/include/signal.h b/include/signal.h index

> > >> 3d6315b741..b4ee02d153 100644

> > >> --- a/include/signal.h

> > >> +++ b/include/signal.h

> > >> @@ -16,7 +16,8 @@ libc_hidden_proto (__libc_current_sigrtmin)

> > >> libc_hidden_proto (__libc_current_sigrtmax)  extern const char *

> > >> const __sys_siglist[_NSIG];  libc_hidden_proto (__sys_siglist)

> > >> -

> > >> +extern const char * const __sys_sigabbrev[_NSIG];

> > >> +libc_hidden_proto

> > >> +(__sys_sigabbrev)

> > >

> > > OK.

> > >

> > >>

> > >>  /* Now define the internal interfaces.  */  extern __sighandler_t

> > >> __bsd_signal (int __sig, __sighandler_t __handler); diff --git

> > >> a/include/string.h b/include/string.h index ce01ad8254..f4ce138622

> > >> 100644

> > >> --- a/include/string.h

> > >> +++ b/include/string.h

> > >> @@ -53,6 +53,9 @@ extern char *__strerror_r (int __errnum, char

> > >> *__buf, size_t __buflen);

> > >>

> > >>  extern char *__strerror_l (int __errnum, locale_t __loc);

> > >>

> > >> +extern const char *__sigdescr_np (int __errnum); libc_hidden_proto

> > >> +(__sigdescr_np)

> > >

> > > OK.

> > >

> > >> +

> > >>  /* Get _STRING_ARCH_unaligned.  */  #include <string_private.h>

> > >> #endif diff --git a/manual/signal.texi b/manual/signal.texi index

> > >> 34def1c06c..a19dff85f8 100644

> > >> --- a/manual/signal.texi

> > >> +++ b/manual/signal.texi

> > >> @@ -880,6 +880,30 @@ to @var{signum}.

> > >>  This function is a BSD feature, declared in the header file @file{signal.h}.

> > >>  @end deftypefun

> > >>

> > >> +@deftypefun void sigdescr_np (int @var{signum}) @standards{GNU,

> > >> +string.h}

> > @safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}

> > >

> > > Use @mtsafe{}, because the function does not touch _sigintr at all.

> >

> > Ack.

> >

> > >

> > >> +This function returns the message describing the signal

> > >> +@var{signum} or @code{NULL} for invalid signal number (i.g

> > >> +"Hangup" for

> > @code{SIGHUP}).

> > >

> > > s/i.g/e.g./g

> >

> > Ack.

> >

> > >

> > >> +Different than @code{strsignal} the returned description is not

> > translated.

> > >> +The message porints to a static storage whose lifetime is the

> > >> +whole lifetime

> > >

> > > s/porints/points/g

> >

> > ACk.

> >

> > >

> > >> +of the program.

> > >> +

> > >> +@pindex string.h

> > >> +This function is a GNU extension, declared in the header file

> > @file{string.h}.

> > >> +@end deftypefun

> > >> +

> > >> +@deftypefun void sigabbrev_np (int @var{signum}) @standards{GNU,

> > >> +string.h}

> > @safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}

> > >

> > > Use @mtsafe{}, because the function does not touch _sigintr at all.

> >

> > Ack.

> >

> > >

> > >> +This function returns the abbreviation describing the signal

> > >> +@var{signum} or @code{NULL} for invalid signal number.  The

> > >> +message porints to a static

> > >

> > > s/porints/points/g

> >

> > Ack.
Adhemerval Zanella via Libc-alpha July 8, 2020, 11:36 a.m. | #4
* Tamar Christina:

> This commit seems to have broken the aarch64 build:

> 

>   sigdescr_np.c:24:1: error: conflicting types for ‘__sigdescr_np’

>    __sigdescr_np (int signum)

>    ^~~~~~~~~~~~~

> 

>   In file included from <command-line>:0:0:

>   ../include/string.h:57:20: note: previous declaration of ‘__sigdescr_np’ was

> here

>    libc_hidden_proto (__sigdescr_np)

>                       ^

>   ./../include/libc-symbols.h:605:33: note: in definition of macro

> ‘__hidden_proto’

>      extern thread __typeof (name) name __hidden_proto_hiddenattr (attrs);

>                                    ^~~~

> 

>   ./../include/libc-symbols.h:624:44: note: in expansion of macro

> ‘hidden_proto’

>    # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)

>                                               ^~~~~~~~~~~~

>   ../include/string.h:57:1: note: in expansion of macro ‘libc_hidden_proto’

>    libc_hidden_proto (__sigdescr_np)

>    ^~~~~~~~~~~~~~~~~

> 

>   In file included from <command-line>:0:0:

>   ../o-iterator.mk:9: recipe for target '/home/teamcity-

> agent/work/fcc7c27539f88edf/build/string/sigdescr_np.o' failed

>   sigdescr_np.c:34:28: error: conflicting types for ‘sigdescr_np’

>    weak_alias (__sigdescr_np, sigdescr_np)

>                               ^

>   ./../include/libc-symbols.h:152:26: note: in definition of macro ‘_weak_alias’

>      extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)))

> \

>                             ^~~~~~~~~

>   sigdescr_np.c:34:1: note: in expansion of macro ‘weak_alias’

>    weak_alias (__sigdescr_np, sigdescr_np)

>    ^~~~~~~~~~

>   In file included from ../include/string.h:63:0,

>                    from sigdescr_np.c:19:

>   ../string/string.h:469:20: note: previous declaration of ‘sigdescr_np’ was

> here

>    extern const char *sigdescr_np (int __sig) __THROW;

>                       ^~~~~~~~~~~

>   make[2]: *** [/home/teamcity-

> agent/work/fcc7c27539f88edf/build/string/sigdescr_np.o] Error 1

>   make[2]: *** Waiting for unfinished jobs....

>   sigabbrev_np.c:24:1: error: conflicting types for ‘sigabbrev_np’

>    sigabbrev_np (int signum)

>    ^~~~~~~~~~~~

>   In file included from ../include/string.h:63:0,

>                    from sigabbrev_np.c:19:

>   ../string/string.h:466:20: note: previous declaration of ‘sigabbrev_np’ was

> here

>    extern const char *sigabbrev_np (int __sig) __THROW;

>                       ^~~~~~~~~~~~

> 

> I'm afraid I don't know glibc internals well enough to know what the

> right fix is here...


What's your GCC version?  I don't see this when building with a GCC 10
cross-compiler.

Thanks,
Florian
Tamar Christina July 8, 2020, 11:48 a.m. | #5
Hi Florian,

> -----Original Message-----

> From: Florian Weimer <fweimer@redhat.com>

> Sent: Wednesday, July 8, 2020 12:37 PM

> 

> * Tamar Christina:

> 

> > This commit seems to have broken the aarch64 build:

> >

> >   sigdescr_np.c:24:1: error: conflicting types for ‘__sigdescr_np’

> >    __sigdescr_np (int signum)

> >    ^~~~~~~~~~~~~

> >

> >   In file included from <command-line>:0:0:

> >   ../include/string.h:57:20: note: previous declaration of

> > ‘__sigdescr_np’ was here

> >    libc_hidden_proto (__sigdescr_np)

> >                       ^

> >   ./../include/libc-symbols.h:605:33: note: in definition of macro

> > ‘__hidden_proto’

> >      extern thread __typeof (name) name __hidden_proto_hiddenattr

> (attrs);

> >                                    ^~~~

> >

> >   ./../include/libc-symbols.h:624:44: note: in expansion of macro

> > ‘hidden_proto’

> >    # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)

> >                                               ^~~~~~~~~~~~

> >   ../include/string.h:57:1: note: in expansion of macro ‘libc_hidden_proto’

> >    libc_hidden_proto (__sigdescr_np)

> >    ^~~~~~~~~~~~~~~~~

> >

> >   In file included from <command-line>:0:0:

> >   ../o-iterator.mk:9: recipe for target '/home/teamcity-

> > agent/work/fcc7c27539f88edf/build/string/sigdescr_np.o' failed

> >   sigdescr_np.c:34:28: error: conflicting types for ‘sigdescr_np’

> >    weak_alias (__sigdescr_np, sigdescr_np)

> >                               ^

> >   ./../include/libc-symbols.h:152:26: note: in definition of macro

> ‘_weak_alias’

> >      extern __typeof (name) aliasname __attribute__ ((weak, alias

> > (#name))) \

> >                             ^~~~~~~~~

> >   sigdescr_np.c:34:1: note: in expansion of macro ‘weak_alias’

> >    weak_alias (__sigdescr_np, sigdescr_np)

> >    ^~~~~~~~~~

> >   In file included from ../include/string.h:63:0,

> >                    from sigdescr_np.c:19:

> >   ../string/string.h:469:20: note: previous declaration of

> > ‘sigdescr_np’ was here

> >    extern const char *sigdescr_np (int __sig) __THROW;

> >                       ^~~~~~~~~~~

> >   make[2]: *** [/home/teamcity-

> > agent/work/fcc7c27539f88edf/build/string/sigdescr_np.o] Error 1

> >   make[2]: *** Waiting for unfinished jobs....

> >   sigabbrev_np.c:24:1: error: conflicting types for ‘sigabbrev_np’

> >    sigabbrev_np (int signum)

> >    ^~~~~~~~~~~~

> >   In file included from ../include/string.h:63:0,

> >                    from sigabbrev_np.c:19:

> >   ../string/string.h:466:20: note: previous declaration of

> > ‘sigabbrev_np’ was here

> >    extern const char *sigabbrev_np (int __sig) __THROW;

> >                       ^~~~~~~~~~~~

> >

> > I'm afraid I don't know glibc internals well enough to know what the

> > right fix is here...

> 

> What's your GCC version?  I don't see this when building with a GCC 10 cross-

> compiler.


It seems to be GCC 6.3 from a native Debian docker image

0e188cdeda88 ~# gcc --version
...
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
...

0e188cdeda88 ~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.12 (stretch)
Release:        9.12
Codename:       stretch

Cheers,
Tamar

> 

> Thanks,

> Florian
Adhemerval Zanella via Libc-alpha July 8, 2020, 11:52 a.m. | #6
* Tamar Christina:

>> What's your GCC version?  I don't see this when building with a GCC

>> 10 cross- compiler.

>

> It seems to be GCC 6.3 from a native Debian docker image

>

> 0e188cdeda88 ~# gcc --version

> ...

> gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

> ...

>

> 0e188cdeda88 ~# lsb_release -a

> No LSB modules are available.

> Distributor ID: Debian

> Description:    Debian GNU/Linux 9.12 (stretch)

> Release:        9.12

> Codename:       stretch


I see.  Looks like GCC 6 does not discard the const on the return type,
although it has no effect in C:

const char *const
sigabbrev_np (int signum)
{
…

Does this patch fixes things for you?

diff --git a/string/sigabbrev_np.c b/string/sigabbrev_np.c
index 3cbe14e769..a5ac6da053 100644
--- a/string/sigabbrev_np.c
+++ b/string/sigabbrev_np.c
@@ -20,7 +20,7 @@
 #include <signal.h>
 #include <array_length.h>
 
-const char *const
+const char *
 sigabbrev_np (int signum)
 {
   const char *abbrev = NULL;
diff --git a/string/sigdescr_np.c b/string/sigdescr_np.c
index 5bcf814c1d..bf2d462b9c 100644
--- a/string/sigdescr_np.c
+++ b/string/sigdescr_np.c
@@ -20,7 +20,7 @@
 #include <signal.h>
 #include <array_length.h>
 
-const char *const
+const char *
 __sigdescr_np (int signum)
 {
   const char *descr = NULL;


Thanks,
Florian
Tamar Christina July 8, 2020, 12:16 p.m. | #7
Hi Florian,

Yup, that patch works.

Thanks!
Tamar

> -----Original Message-----

> From: Florian Weimer <fweimer@redhat.com>

> Sent: Wednesday, July 8, 2020 12:52 PM

> To: Tamar Christina <Tamar.Christina@arm.com>

> Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>; Carlos O'Donell

> <carlos@redhat.com>; libc-alpha@sourceware.org

> Subject: Re: [PATCH v5 12/13] string: Add sigabbrev_np and sigdescr_np

> 

> * Tamar Christina:

> 

> >> What's your GCC version?  I don't see this when building with a GCC

> >> 10 cross- compiler.

> >

> > It seems to be GCC 6.3 from a native Debian docker image

> >

> > 0e188cdeda88 ~# gcc --version

> > ...

> > gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ...

> >

> > 0e188cdeda88 ~# lsb_release -a

> > No LSB modules are available.

> > Distributor ID: Debian

> > Description:    Debian GNU/Linux 9.12 (stretch)

> > Release:        9.12

> > Codename:       stretch

> 

> I see.  Looks like GCC 6 does not discard the const on the return type,

> although it has no effect in C:

> 

> const char *const

> sigabbrev_np (int signum)

> {

> …

> 

> Does this patch fixes things for you?

> 

> diff --git a/string/sigabbrev_np.c b/string/sigabbrev_np.c index

> 3cbe14e769..a5ac6da053 100644

> --- a/string/sigabbrev_np.c

> +++ b/string/sigabbrev_np.c

> @@ -20,7 +20,7 @@

>  #include <signal.h>

>  #include <array_length.h>

> 

> -const char *const

> +const char *

>  sigabbrev_np (int signum)

>  {

>    const char *abbrev = NULL;

> diff --git a/string/sigdescr_np.c b/string/sigdescr_np.c index

> 5bcf814c1d..bf2d462b9c 100644

> --- a/string/sigdescr_np.c

> +++ b/string/sigdescr_np.c

> @@ -20,7 +20,7 @@

>  #include <signal.h>

>  #include <array_length.h>

> 

> -const char *const

> +const char *

>  __sigdescr_np (int signum)

>  {

>    const char *descr = NULL;

> 

> 

> Thanks,

> Florian
Adhemerval Zanella via Libc-alpha July 8, 2020, 12:23 p.m. | #8
Thanks for catching it, the oldest gcc I tested it was 7.5.

On 08/07/2020 09:16, Tamar Christina wrote:
> Hi Florian,

> 

> Yup, that patch works.

> 

> Thanks!

> Tamar

> 

>> -----Original Message-----

>> From: Florian Weimer <fweimer@redhat.com>

>> Sent: Wednesday, July 8, 2020 12:52 PM

>> To: Tamar Christina <Tamar.Christina@arm.com>

>> Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>; Carlos O'Donell

>> <carlos@redhat.com>; libc-alpha@sourceware.org

>> Subject: Re: [PATCH v5 12/13] string: Add sigabbrev_np and sigdescr_np

>>

>> * Tamar Christina:

>>

>>>> What's your GCC version?  I don't see this when building with a GCC

>>>> 10 cross- compiler.

>>>

>>> It seems to be GCC 6.3 from a native Debian docker image

>>>

>>> 0e188cdeda88 ~# gcc --version

>>> ...

>>> gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ...

>>>

>>> 0e188cdeda88 ~# lsb_release -a

>>> No LSB modules are available.

>>> Distributor ID: Debian

>>> Description:    Debian GNU/Linux 9.12 (stretch)

>>> Release:        9.12

>>> Codename:       stretch

>>

>> I see.  Looks like GCC 6 does not discard the const on the return type,

>> although it has no effect in C:

>>

>> const char *const

>> sigabbrev_np (int signum)

>> {

>> …

>>

>> Does this patch fixes things for you?

>>

>> diff --git a/string/sigabbrev_np.c b/string/sigabbrev_np.c index

>> 3cbe14e769..a5ac6da053 100644

>> --- a/string/sigabbrev_np.c

>> +++ b/string/sigabbrev_np.c

>> @@ -20,7 +20,7 @@

>>  #include <signal.h>

>>  #include <array_length.h>

>>

>> -const char *const

>> +const char *

>>  sigabbrev_np (int signum)

>>  {

>>    const char *abbrev = NULL;

>> diff --git a/string/sigdescr_np.c b/string/sigdescr_np.c index

>> 5bcf814c1d..bf2d462b9c 100644

>> --- a/string/sigdescr_np.c

>> +++ b/string/sigdescr_np.c

>> @@ -20,7 +20,7 @@

>>  #include <signal.h>

>>  #include <array_length.h>

>>

>> -const char *const

>> +const char *

>>  __sigdescr_np (int signum)

>>  {

>>    const char *descr = NULL;

>>

>>

>> Thanks,

>> Florian

>

Patch

diff --git a/NEWS b/NEWS
index ec39b6e056..f504772eb6 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,16 @@  Major new features:
   pthread_attr_getsigmask_np have been added.  They allow applications
   to specify the signal mask of a thread created with pthread_create.
 
+* The functions sigabbrev_np and sigdescr_np have been added.  The
+  sigabbrev_np returns the abbreviated signal name (i.g. "HUP" for SIGHUP)
+  while sigdescr_np returns string describing signal number (i.g "Hangup"
+  for SIGHUP).  Different than strsignal, sigdescr_np does not attempt
+  to translate the return description and both functions return NULL for
+  an invalid signal number.
+
+  They should be used instead of sys_siglist or sys_sigabbrev and they
+  are both thread and async-signal safe.  These functions are GNU extensions.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The deprecated <sys/sysctl.h> header and the sysctl function have been
diff --git a/include/signal.h b/include/signal.h
index 3d6315b741..b4ee02d153 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -16,7 +16,8 @@  libc_hidden_proto (__libc_current_sigrtmin)
 libc_hidden_proto (__libc_current_sigrtmax)
 extern const char * const __sys_siglist[_NSIG];
 libc_hidden_proto (__sys_siglist)
-
+extern const char * const __sys_sigabbrev[_NSIG];
+libc_hidden_proto (__sys_sigabbrev)
 
 /* Now define the internal interfaces.  */
 extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler);
diff --git a/include/string.h b/include/string.h
index ce01ad8254..f4ce138622 100644
--- a/include/string.h
+++ b/include/string.h
@@ -53,6 +53,9 @@  extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);
 
 extern char *__strerror_l (int __errnum, locale_t __loc);
 
+extern const char *__sigdescr_np (int __errnum);
+libc_hidden_proto (__sigdescr_np)
+
 /* Get _STRING_ARCH_unaligned.  */
 #include <string_private.h>
 #endif
diff --git a/manual/signal.texi b/manual/signal.texi
index 34def1c06c..a19dff85f8 100644
--- a/manual/signal.texi
+++ b/manual/signal.texi
@@ -880,6 +880,30 @@  to @var{signum}.
 This function is a BSD feature, declared in the header file @file{signal.h}.
 @end deftypefun
 
+@deftypefun void sigdescr_np (int @var{signum})
+@standards{GNU, string.h}
+@safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}
+This function returns the message describing the signal @var{signum} or
+@code{NULL} for invalid signal number (i.g "Hangup" for @code{SIGHUP}).
+Different than @code{strsignal} the returned description is not translated.
+The message porints to a static storage whose lifetime is the whole lifetime
+of the program.
+
+@pindex string.h
+This function is a GNU extension, declared in the header file @file{string.h}.
+@end deftypefun
+
+@deftypefun void sigabbrev_np (int @var{signum})
+@standards{GNU, string.h}
+@safety{@prelim{}@mtsafe{@mtssigintr{}}@assafe{}@acsafe{}}
+This function returns the abbreviation describing the signal @var{signum} or
+@code{NULL} for invalid signal number.  The message porints to a static
+storage whose lifetime is the whole lifetime of the program.
+
+@pindex string.h
+This function is a GNU extension, declared in the header file @file{string.h}.
+@end deftypefun
+
 @node Signal Actions
 @section Specifying Signal Actions
 @cindex signal actions
diff --git a/stdio-common/siglist.c b/stdio-common/siglist.c
index 3e29aa8227..6b020262b2 100644
--- a/stdio-common/siglist.c
+++ b/stdio-common/siglist.c
@@ -34,5 +34,6 @@  const char *const __sys_sigabbrev[NSIG] =
 #include <siglist.h>
 #undef init_sig
 };
+libc_hidden_def (__sys_sigabbrev)
 
 #include <siglist-compat.c>
diff --git a/string/Makefile b/string/Makefile
index 73e5ac2ebe..e5075521b7 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -44,7 +44,8 @@  routines	:= strcat strchr strcmp strcoll strcpy strcspn		\
 				     addsep replace)			\
 		   envz basename					\
 		   strcoll_l strxfrm_l string-inlines memrchr		\
-		   xpg-strerror strerror_l explicit_bzero
+		   xpg-strerror strerror_l explicit_bzero		\
+		   sigdescr_np sigabbrev_np
 
 strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\
 		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\
@@ -60,7 +61,8 @@  tests		:= tester inl-tester noinl-tester testcopy test-ffs	\
 		   bug-envz1 tst-strxfrm2 tst-endian tst-svc2		\
 		   tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt	\
 		   test-endian-types test-endian-file-scope		\
-		   test-endian-sign-conversion tst-memmove-overflow
+		   test-endian-sign-conversion tst-memmove-overflow	\
+		   test-sig_np
 
 # This test allocates a lot of memory and can run for a long time.
 xtests = tst-strcoll-overflow
diff --git a/string/Versions b/string/Versions
index 9b709d12a9..6f8dd2d372 100644
--- a/string/Versions
+++ b/string/Versions
@@ -85,4 +85,7 @@  libc {
   GLIBC_2.25 {
     explicit_bzero;
   }
+  GLIBC_2.32 {
+    sigdescr_np; sigabbrev_np;
+  }
 }
diff --git a/string/sigabbrev_np.c b/string/sigabbrev_np.c
new file mode 100644
index 0000000000..3cbe14e769
--- /dev/null
+++ b/string/sigabbrev_np.c
@@ -0,0 +1,33 @@ 
+/* Return string describing signal abbreviation.
+   Copyright (C) 2020 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+#include <signal.h>
+#include <array_length.h>
+
+const char *const
+sigabbrev_np (int signum)
+{
+  const char *abbrev = NULL;
+
+  if (signum >= 0 && signum <= NSIG
+      && signum < array_length (__sys_sigabbrev))
+    abbrev = __sys_sigabbrev[signum];
+
+  return abbrev;
+}
diff --git a/string/sigdescr_np.c b/string/sigdescr_np.c
new file mode 100644
index 0000000000..5bcf814c1d
--- /dev/null
+++ b/string/sigdescr_np.c
@@ -0,0 +1,34 @@ 
+/* Return string describing signal.
+   Copyright (C) 2020 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+#include <signal.h>
+#include <array_length.h>
+
+const char *const
+__sigdescr_np (int signum)
+{
+  const char *descr = NULL;
+
+  if (signum >= 0 && signum <= NSIG && signum < array_length (__sys_siglist))
+    descr = __sys_siglist[signum];
+
+  return descr;
+}
+libc_hidden_def (__sigdescr_np)
+weak_alias (__sigdescr_np, sigdescr_np)
diff --git a/string/string.h b/string/string.h
index d7ce0f4a1b..0119d7f45d 100644
--- a/string/string.h
+++ b/string/string.h
@@ -454,6 +454,14 @@  extern char *strsep (char **__restrict __stringp,
 /* Return a string describing the meaning of the signal number in SIG.  */
 extern char *strsignal (int __sig) __THROW;
 
+# ifdef __USE_GNU
+/* Return an abbreviation string for the signal number SIG.  */
+extern const char *sigabbrev_np (int __sig) __THROW;
+/* Return a string describing the meaning of the signal number in SIG,
+   the result is not translated.  */
+extern const char *sigdescr_np (int __sig) __THROW;
+# endif
+
 /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST.  */
 extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
      __THROW __nonnull ((1, 2));
diff --git a/string/strsignal.c b/string/strsignal.c
index 701ce20e6e..a9b911ce6e 100644
--- a/string/strsignal.c
+++ b/string/strsignal.c
@@ -21,19 +21,14 @@ 
 #include <string.h>
 #include <libintl.h>
 #include <tls-internal.h>
-#include <array_length.h>
 
 /* Return a string describing the meaning of the signal number SIGNUM.  */
 char *
 strsignal (int signum)
 {
-  const char *desc = NULL;
-
-  if (signum >= 0 && signum <= NSIG && signum < array_length (__sys_siglist))
-    desc = __sys_siglist[signum];
-
+  const char *desc = __sigdescr_np (signum);
   if (desc != NULL)
-    return (char *) _(desc);
+    return _(desc);
 
   struct tls_internal_t *tls_internal = __glibc_tls_internal ();
   free (tls_internal->strsignal_buf);
diff --git a/string/test-sig_np.c b/string/test-sig_np.c
new file mode 100644
index 0000000000..8b5117050c
--- /dev/null
+++ b/string/test-sig_np.c
@@ -0,0 +1,51 @@ 
+/* Test and sigabbrev_np and sigdescr_np.
+   Copyright (C) 2020 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
+   <https://www.gnu.org/licenses/>.  */
+
+#include <string.h>
+#include <signal.h>
+#include <array_length.h>
+
+#include <support/support.h>
+#include <support/check.h>
+
+static const struct test_t
+{
+  int errno;
+  const char *abbrev;
+  const char *descr;
+} tests[] =
+{
+#define N_(name)                      name
+#define init_sig(sig, abbrev, desc)   { sig, abbrev, desc },
+#include <siglist.h>
+#undef init_sig
+};
+
+static int
+do_test (void)
+{
+  for (size_t i = 0; i < array_length (tests); i++)
+    {
+      TEST_COMPARE_STRING (sigabbrev_np (tests[i].errno), tests[i].abbrev);
+      TEST_COMPARE_STRING (sigdescr_np (tests[i].errno), tests[i].descr);
+    }
+
+  return 0;
+}
+
+#include <support/test-driver.c>
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 60696d827f..ff8ad98d03 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2182,6 +2182,8 @@  GLIBC_2.3.4 xdr_quad_t F
 GLIBC_2.3.4 xdr_u_quad_t F
 GLIBC_2.30 twalk_r F
 GLIBC_2.32 mach_print F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.32 thrd_current F
 GLIBC_2.32 thrd_equal F
 GLIBC_2.32 thrd_sleep F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 48c790b15d..bb6045d8a6 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2155,3 +2155,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index cb70cb974f..8e15a58eaf 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2237,6 +2237,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 573eca117e..ce82b840e8 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -139,6 +139,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 8a8633f0a4..c7a436cd42 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -136,6 +136,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 3042a93084..7f51d47b2f 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2099,3 +2099,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index a02a576321..053cda00a4 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2058,6 +2058,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index f0b9c9e070..f18de50f9e 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2224,6 +2224,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index 1534fd7a24..a1966cac5a 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2090,6 +2090,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 9a0ada4b52..8f44bc9231 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -140,6 +140,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0x98
 GLIBC_2.4 _IO_2_1_stdin_ D 0x98
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 333c35bf16..088f2fa0f2 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2170,6 +2170,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 824eceec11..34c1c4fdca 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2150,3 +2150,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index 5a6dcdd21b..099d51e893 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2147,3 +2147,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 6e5dbb28f1..ea86646c3b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2141,6 +2141,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 3ee64614b2..9adac43e36 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2139,6 +2139,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index dc62615524..c42c093cfb 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2147,6 +2147,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 8cf78bcf51..605e60a35e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2141,6 +2141,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 7817aeb0e2..7a57babca5 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2188,3 +2188,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index ca04e8f2d3..c3745c3733 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2197,6 +2197,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 10cb895639..719512e999 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2230,6 +2230,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 96ddc448d7..3f79daa39c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2060,6 +2060,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index deddb53d83..af1a2ae8a6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2350,3 +2350,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index 58217dcb13..ff5b64c1dd 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2117,3 +2117,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index c22c29b35a..576caca63c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2195,6 +2195,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 568f1727c4..7201b10288 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2096,6 +2096,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index d9988dae90..4f954ac7ee 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2065,6 +2065,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 39edeffe82..9db9ba5cc0 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2062,6 +2062,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 8668e15e8c..ecb54db317 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2186,6 +2186,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index eb884afa3e..74bd6efed8 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2113,6 +2113,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index a208fb3556..50e45a43e8 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2071,6 +2071,8 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 3eca3493e2..59b26b097d 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2168,3 +2168,5 @@  GLIBC_2.32 pthread_attr_setsigmask_np F
 GLIBC_2.32 pthread_getaffinity_np F
 GLIBC_2.32 pthread_getattr_np F
 GLIBC_2.32 pthread_sigmask F
+GLIBC_2.32 sigabbrev_np F
+GLIBC_2.32 sigdescr_np F