[v4] stdlib: Implement C2Y uabs, ulabs, ullabs and uimaxabs

Message ID 20250402220957.119870-2-glibc@lenardmollenkopf.de (mailing list archive)
State New
Headers
Series [v4] stdlib: Implement C2Y uabs, ulabs, ullabs and uimaxabs |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Test passed
redhat-pt-bot/TryBot-still_applies warning Patch no longer applies to master

Commit Message

Lenard Mollenkopf April 2, 2025, 10:09 p.m. UTC
  C2Y adds unsigned versions of the abs functions (see C2Y draft N3467 and
proposal N3349).

Tested for x86_64.

Signed-off-by: Lenard Mollenkopf <glibc@lenardmollenkopf.de>
---
 NEWS                                          |  3 +
 manual/arith.texi                             | 12 +++-
 stdlib/Makefile                               | 12 ++++
 stdlib/Versions                               |  6 ++
 stdlib/inttypes.h                             |  5 ++
 stdlib/stdlib.h                               |  6 ++
 stdlib/tst-uabs.c                             | 45 +++++++++++++++
 stdlib/tst-uimaxabs.c                         | 51 +++++++++++++++++
 stdlib/tst-ulabs.c                            | 52 ++++++++++++++++++
 stdlib/tst-ullabs.c                           | 55 +++++++++++++++++++
 stdlib/uabs.c                                 | 28 ++++++++++
 stdlib/ulabs.c                                | 33 +++++++++++
 stdlib/ullabs.c                               | 33 +++++++++++
 sysdeps/mach/hurd/i386/libc.abilist           |  4 ++
 sysdeps/mach/hurd/x86_64/libc.abilist         |  4 ++
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  4 ++
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |  4 ++
 sysdeps/unix/sysv/linux/arc/libc.abilist      |  4 ++
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  4 ++
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  4 ++
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  4 ++
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  4 ++
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  4 ++
 .../sysv/linux/loongarch/lp64/libc.abilist    |  4 ++
 .../sysv/linux/m68k/coldfire/libc.abilist     |  4 ++
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  4 ++
 .../sysv/linux/microblaze/be/libc.abilist     |  4 ++
 .../sysv/linux/microblaze/le/libc.abilist     |  4 ++
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  4 ++
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  4 ++
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  4 ++
 .../sysv/linux/mips/mips64/n64/libc.abilist   |  4 ++
 sysdeps/unix/sysv/linux/or1k/libc.abilist     |  4 ++
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  4 ++
 .../powerpc/powerpc32/nofpu/libc.abilist      |  4 ++
 .../linux/powerpc/powerpc64/be/libc.abilist   |  4 ++
 .../linux/powerpc/powerpc64/le/libc.abilist   |  4 ++
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |  4 ++
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |  4 ++
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  4 ++
 .../unix/sysv/linux/s390/s390-64/libc.abilist |  4 ++
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  4 ++
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  4 ++
 .../sysv/linux/sparc/sparc32/libc.abilist     |  4 ++
 .../sysv/linux/sparc/sparc64/libc.abilist     |  4 ++
 .../unix/sysv/linux/x86_64/64/libc.abilist    |  4 ++
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |  4 ++
 47 files changed, 475 insertions(+), 2 deletions(-)
 create mode 100644 stdlib/tst-uabs.c
 create mode 100644 stdlib/tst-uimaxabs.c
 create mode 100644 stdlib/tst-ulabs.c
 create mode 100644 stdlib/tst-ullabs.c
 create mode 100644 stdlib/uabs.c
 create mode 100644 stdlib/ulabs.c
 create mode 100644 stdlib/ullabs.c
  

Comments

Florian Weimer April 3, 2025, 9:45 a.m. UTC | #1
* Lenard Mollenkopf:

> diff --git a/manual/arith.texi b/manual/arith.texi
> index 034d9d2ba5..4b8584d487 100644
> --- a/manual/arith.texi
> +++ b/manual/arith.texi
> @@ -1233,25 +1233,33 @@ whose imaginary part is @var{y}, the absolute value is @w{@code{sqrt
>  
>  @pindex math.h
>  @pindex stdlib.h
> -Prototypes for @code{abs}, @code{labs} and @code{llabs} are in @file{stdlib.h};
> -@code{imaxabs} is declared in @file{inttypes.h};
> +Prototypes for @code{abs}, @code{labs}, @code{llabs},
> +@code{uabs}, @code{ulabs} and @code{ullabs} are in @file{stdlib.h};
> +@code{imaxabs} and @code{uimaxabs} are declared in @file{inttypes.h};
>  the @code{fabs} functions are declared in @file{math.h};
>  the @code{cabs} functions are declared in @file{complex.h}.
>  
>  @deftypefun int abs (int @var{number})
>  @deftypefunx {long int} labs (long int @var{number})
>  @deftypefunx {long long int} llabs (long long int @var{number})
> +@deftypefunx unsigned int uabs (int @var{number})

I believe that too needs to be {unsigned int} .

> +@deftypefunx {unsigned long int} ulabs (long int @var{number})
> +@deftypefunx {unsigned long long int} ullabs (long long int @var{number})
>  @deftypefunx intmax_t imaxabs (intmax_t @var{number})
> +@deftypefunx uintmax_t uimaxabs (intmax_t @var{number})

Rest looks okay to me.

Thanks,
Florian
  

Patch

diff --git a/NEWS b/NEWS
index 52cbf1a989..659e76a9cb 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@  Major new features:
 
 * On Linux, the pthread_gettid_np function has been added.
 
+* The ISO C2Y family of unsigned abs functions, i.e.
+  uabs, ulabs, ullabs and uimaxabs, are now supported.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
   [Add deprecations, removals and changes affecting compatibility here]
diff --git a/manual/arith.texi b/manual/arith.texi
index 034d9d2ba5..4b8584d487 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -1233,25 +1233,33 @@  whose imaginary part is @var{y}, the absolute value is @w{@code{sqrt
 
 @pindex math.h
 @pindex stdlib.h
-Prototypes for @code{abs}, @code{labs} and @code{llabs} are in @file{stdlib.h};
-@code{imaxabs} is declared in @file{inttypes.h};
+Prototypes for @code{abs}, @code{labs}, @code{llabs},
+@code{uabs}, @code{ulabs} and @code{ullabs} are in @file{stdlib.h};
+@code{imaxabs} and @code{uimaxabs} are declared in @file{inttypes.h};
 the @code{fabs} functions are declared in @file{math.h};
 the @code{cabs} functions are declared in @file{complex.h}.
 
 @deftypefun int abs (int @var{number})
 @deftypefunx {long int} labs (long int @var{number})
 @deftypefunx {long long int} llabs (long long int @var{number})
+@deftypefunx unsigned int uabs (int @var{number})
+@deftypefunx {unsigned long int} ulabs (long int @var{number})
+@deftypefunx {unsigned long long int} ullabs (long long int @var{number})
 @deftypefunx intmax_t imaxabs (intmax_t @var{number})
+@deftypefunx uintmax_t uimaxabs (intmax_t @var{number})
 @standards{ISO, stdlib.h}
 @standardsx{imaxabs, ISO, inttypes.h}
+@standardsx{uimaxabs, ISO, inttypes.h}
 @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
 These functions return the absolute value of @var{number}.
 
 Most computers use a two's complement integer representation, in which
 the absolute value of @code{INT_MIN} (the smallest possible @code{int})
 cannot be represented; thus, @w{@code{abs (INT_MIN)}} is not defined.
+Using @code{uabs} avoids this.
 
 @code{llabs} and @code{imaxdiv} are new to @w{ISO C99}.
+@code{uabs}, @code{ulabs}, @code{ullabs} and @code{uimaxabs} are new to @w{ISO C2Y}.
 
 See @ref{Integers} for a description of the @code{intmax_t} type.
 
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 513445bcbc..1c80e497f0 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -211,6 +211,9 @@  routines := \
   strtoull_l \
   swapcontext \
   system \
+  uabs \
+  ulabs \
+  ullabs \
   wcstombs \
   wctomb  \
   xpg_basename \
@@ -363,6 +366,10 @@  tests := \
   tst-swapcontext2 \
   tst-thread-quick_exit \
   tst-tininess \
+  tst-uabs \
+  tst-uimaxabs \
+  tst-ulabs \
+  tst-ullabs \
   tst-unsetenv1 \
   tst-width \
   tst-width-stdint \
@@ -412,6 +419,11 @@  CFLAGS-tst-abs.c += -fno-builtin
 CFLAGS-tst-labs.c += -fno-builtin
 CFLAGS-tst-llabs.c += -fno-builtin
 
+CFLAGS-tst-uabs.c += -fno-builtin
+CFLAGS-tst-uimaxabs.c += -fno-builtin
+CFLAGS-tst-ulabs.c += -fno-builtin
+CFLAGS-tst-ullabs.c += -fno-builtin
+
 CFLAGS-tst-stdbit-Wconversion.c += -Wconversion -Werror
 CFLAGS-tst-stdc_trailing_zeros.c += -fno-builtin
 CFLAGS-tst-stdc_trailing_ones.c += -fno-builtin
diff --git a/stdlib/Versions b/stdlib/Versions
index ea2265bbd4..6d024000f8 100644
--- a/stdlib/Versions
+++ b/stdlib/Versions
@@ -223,6 +223,12 @@  libc {
     stdc_bit_ceil_ul;
     stdc_bit_ceil_ull;
   }
+  GLIBC_2.42 {
+    uabs;
+    uimaxabs;
+    ulabs;
+    ullabs;
+  }
   GLIBC_PRIVATE {
     # functions which have an additional interface since they are
     # are cancelable.
diff --git a/stdlib/inttypes.h b/stdlib/inttypes.h
index 95324f0784..9726abf5b1 100644
--- a/stdlib/inttypes.h
+++ b/stdlib/inttypes.h
@@ -350,6 +350,11 @@  typedef struct
 /* Compute absolute value of N.  */
 extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
 
+
+#if __GLIBC_USE (ISOC2Y)
+extern uintmax_t uimaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
+#endif
+
 /* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
 extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
       __THROW __attribute__ ((__const__));
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 975f5aeb0b..cd4503c761 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -985,6 +985,12 @@  __extension__ extern long long int llabs (long long int __x)
      __THROW __attribute__ ((__const__)) __wur;
 #endif
 
+#if __GLIBC_USE (ISOC2Y)
+extern unsigned int uabs (int __x) __THROW __attribute__ ((__const__)) __wur;
+extern unsigned long int ulabs (long int __x) __THROW __attribute__ ((__const__)) __wur;
+__extension__ extern unsigned long long int ullabs (long long int __x)
+     __THROW __attribute__ ((__const__)) __wur;
+#endif
 
 /* Return the `div_t', `ldiv_t' or `lldiv_t' representation
    of the value of NUMER over DENOM. */
diff --git a/stdlib/tst-uabs.c b/stdlib/tst-uabs.c
new file mode 100644
index 0000000000..13c9f58dc0
--- /dev/null
+++ b/stdlib/tst-uabs.c
@@ -0,0 +1,45 @@ 
+/* Basic tests for uabs.
+   Copyright (C) 2025 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 <limits.h>
+#include <stdlib.h>
+
+#include <support/check.h>
+
+#define LARGE_PRIME 49999
+
+static int do_test (void)
+{
+  int i;
+
+  TEST_COMPARE (uabs (INT_MAX), INT_MAX);
+  TEST_COMPARE (uabs (INT_MIN), (unsigned int)INT_MAX + 1);
+  TEST_COMPARE (uabs (-1), 1);
+  TEST_COMPARE (uabs (0), 0);
+  TEST_COMPARE (uabs (1), 1);
+
+  for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME)
+    TEST_COMPARE (uabs (i), -i);
+
+  for (i = 0; i < INT_MAX - LARGE_PRIME; i += LARGE_PRIME)
+    TEST_COMPARE (uabs (i), i);
+
+  return EXIT_SUCCESS;
+}
+
+#include <support/test-driver.c>
diff --git a/stdlib/tst-uimaxabs.c b/stdlib/tst-uimaxabs.c
new file mode 100644
index 0000000000..4500ec1797
--- /dev/null
+++ b/stdlib/tst-uimaxabs.c
@@ -0,0 +1,51 @@ 
+/* Basic tests for uimaxabs.
+   Copyright (C) 2025 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 <inttypes.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include <support/check.h>
+
+#define LARGE_PRIME 49999
+
+static int do_test (void)
+{
+  intmax_t i;
+
+  TEST_COMPARE (uimaxabs (INTMAX_MIN), (uintmax_t)INTMAX_MAX + 1);
+  TEST_COMPARE (uimaxabs (-1), 1);
+  TEST_COMPARE (uimaxabs (0), 0);
+  TEST_COMPARE (uimaxabs (1), 1);
+
+  for (i = INTMAX_MIN + 1; i < INTMAX_MIN + INT_MAX; i += LARGE_PRIME)
+    TEST_COMPARE (uimaxabs (i), -i);
+
+  for (i = INTMAX_MAX - INT_MAX; i < INTMAX_MAX - LARGE_PRIME; i += LARGE_PRIME)
+    TEST_COMPARE (uimaxabs (i), i);
+
+  for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME)
+    TEST_COMPARE (uimaxabs (i), -i);
+
+  for (i = 0; i < INT_MAX; i += LARGE_PRIME)
+    TEST_COMPARE (uimaxabs (i), i);
+
+  return EXIT_SUCCESS;
+}
+
+#include <support/test-driver.c>
diff --git a/stdlib/tst-ulabs.c b/stdlib/tst-ulabs.c
new file mode 100644
index 0000000000..3b5323e051
--- /dev/null
+++ b/stdlib/tst-ulabs.c
@@ -0,0 +1,52 @@ 
+/* Basic tests for ulabs.
+   Copyright (C) 2025 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 <limits.h>
+#include <stdlib.h>
+
+#include <support/check.h>
+
+#define LARGE_PRIME 49999
+
+static int do_test (void)
+{
+  long int i;
+
+  TEST_COMPARE (ulabs (LONG_MAX), LONG_MAX);
+  TEST_COMPARE (ulabs (LONG_MIN), (unsigned long int)LONG_MAX + 1);
+  TEST_COMPARE (ulabs (-1), 1);
+  TEST_COMPARE (ulabs (0), 0);
+  TEST_COMPARE (ulabs (1), 1);
+
+  for (i = LONG_MIN + 1; i < LONG_MIN + INT_MAX; i += LARGE_PRIME)
+    TEST_COMPARE (ulabs (i), -i);
+
+  for (i = LONG_MAX - INT_MAX; i < LONG_MAX - LARGE_PRIME;
+       i += LARGE_PRIME)
+    TEST_COMPARE (ulabs (i), i);
+
+  for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME)
+    TEST_COMPARE (ulabs (i), -i);
+
+  for (i = 0; i <= INT_MAX - LARGE_PRIME; i += LARGE_PRIME)
+    TEST_COMPARE (ulabs (i), i);
+
+  return EXIT_SUCCESS;
+}
+
+#include <support/test-driver.c>
diff --git a/stdlib/tst-ullabs.c b/stdlib/tst-ullabs.c
new file mode 100644
index 0000000000..ac34ec776e
--- /dev/null
+++ b/stdlib/tst-ullabs.c
@@ -0,0 +1,55 @@ 
+/* Basic tests for ullabs.
+   Copyright (C) 2025 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 <limits.h>
+#include <stdlib.h>
+
+#include <support/check.h>
+
+#define LARGE_PRIME 49999
+
+static int do_test (void)
+{
+  long long int i;
+
+  TEST_COMPARE (ullabs (LLONG_MAX), LLONG_MAX);
+  TEST_COMPARE (ullabs (LLONG_MIN), (unsigned long long int)LLONG_MAX + 1);
+  TEST_COMPARE (ullabs (0x00000000ffffffffL), 0x00000000ffffffffL);
+  TEST_COMPARE (ullabs (0x0000000100000000L), 0x0000000100000000L);
+  TEST_COMPARE (ullabs (0x80000000ffffffffL), 0x7fffffff00000001L);
+  TEST_COMPARE (ullabs (0x8000000100000000L), 0x7fffffff00000000L);
+  TEST_COMPARE (ullabs (-1), 1);
+  TEST_COMPARE (ullabs (0), 0);
+  TEST_COMPARE (ullabs (1), 1);
+
+  for (i = LLONG_MIN + 1; i < LLONG_MIN + INT_MAX; i += LARGE_PRIME)
+    TEST_COMPARE (ullabs (i), -i);
+
+  for (i = LLONG_MAX - INT_MAX; i < LLONG_MAX - LARGE_PRIME; i += LARGE_PRIME)
+    TEST_COMPARE (ullabs (i), i);
+
+  for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME)
+    TEST_COMPARE (ullabs (i), -i);
+
+  for (i = 0; i < INT_MAX; i += LARGE_PRIME)
+    TEST_COMPARE (ullabs (i), i);
+
+  return EXIT_SUCCESS;
+}
+
+#include <support/test-driver.c>
diff --git a/stdlib/uabs.c b/stdlib/uabs.c
new file mode 100644
index 0000000000..72aea5fbfb
--- /dev/null
+++ b/stdlib/uabs.c
@@ -0,0 +1,28 @@ 
+/* Copyright (C) 2025 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 <stdlib.h>
+
+#undef	uabs
+
+/* Return the absolute value of I.  */
+unsigned int
+uabs (int i)
+{
+  unsigned int j = i;
+  return i < 0 ? -j : i;
+}
diff --git a/stdlib/ulabs.c b/stdlib/ulabs.c
new file mode 100644
index 0000000000..c2ccfb8c32
--- /dev/null
+++ b/stdlib/ulabs.c
@@ -0,0 +1,33 @@ 
+/* Copyright (C) 2025 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 <limits.h>
+#include <stdlib.h>
+
+#undef	ulabs
+
+/* Return the absolute value of I.  */
+unsigned long int
+ulabs (long int i)
+{
+  unsigned long int j = i;
+  return i < 0 ? -j : i;
+}
+
+#if ULONG_MAX != UINT_MAX
+weak_alias (ulabs, uimaxabs)
+#endif
diff --git a/stdlib/ullabs.c b/stdlib/ullabs.c
new file mode 100644
index 0000000000..11268c29f4
--- /dev/null
+++ b/stdlib/ullabs.c
@@ -0,0 +1,33 @@ 
+/* Copyright (C) 2025 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 <limits.h>
+#include <stdlib.h>
+
+#undef	ullabs
+
+/* Return the absolute value of I.  */
+unsigned long long int
+ullabs (long long int i)
+{
+  unsigned long long int j = i;
+  return i < 0 ? -j : i;
+}
+
+#if ULONG_MAX == UINT_MAX
+weak_alias (ullabs, uimaxabs)
+#endif
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 0b963dc890..3e183f5c02 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2614,6 +2614,10 @@  GLIBC_2.42 pthread_rwlockattr_destroy F
 GLIBC_2.42 pthread_rwlockattr_getpshared F
 GLIBC_2.42 pthread_rwlockattr_init F
 GLIBC_2.42 pthread_rwlockattr_setpshared F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index b9e9349b9d..688ee26f4b 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -2297,6 +2297,10 @@  GLIBC_2.42 pthread_rwlockattr_destroy F
 GLIBC_2.42 pthread_rwlockattr_getpshared F
 GLIBC_2.42 pthread_rwlockattr_init F
 GLIBC_2.42 pthread_rwlockattr_setpshared F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 HURD_CTHREADS_0.3 __cthread_getspecific F
 HURD_CTHREADS_0.3 __cthread_keycreate F
 HURD_CTHREADS_0.3 __cthread_setspecific F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 41f8f39911..aa6bf483dd 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2753,3 +2753,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 34efc96781..d5df9656a8 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -3100,6 +3100,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index de7c618d28..c46c08da85 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -2514,3 +2514,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 96f0314b16..4df150c0f0 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -2806,6 +2806,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 635468fa13..be294783f6 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -2803,6 +2803,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 490694ddce..f123757134 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2790,3 +2790,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index b1905da767..2dc85b9533 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2827,6 +2827,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 424ef34a8b..1e38217ec6 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -3010,6 +3010,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
index 420471eb24..927fc21445 100644
--- a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
@@ -2274,3 +2274,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 95a68c7cc1..74da49d9da 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -2786,6 +2786,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 442e82b6d2..e5d678111f 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2953,6 +2953,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 20f7712988..4dbd4b6045 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2839,3 +2839,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index f61ed3bf26..c5965bb50c 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2836,3 +2836,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 381120cc16..10715e0777 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2914,6 +2914,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 2f51146084..3d229b9853 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2912,6 +2912,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index e6071be2ae..e4cb45275b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2920,6 +2920,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index f41e209a2b..8a32d2585d 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2822,6 +2822,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/or1k/libc.abilist b/sysdeps/unix/sysv/linux/or1k/libc.abilist
index bbcdb31f09..64dac95b2a 100644
--- a/sysdeps/unix/sysv/linux/or1k/libc.abilist
+++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist
@@ -2264,3 +2264,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index e0ea22b9c6..cc5e93c77c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -3143,6 +3143,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 16b9a771f1..9814997083 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -3188,6 +3188,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 070f6f5a08..7f46295c11 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2897,6 +2897,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 4378d1d922..f24f81bb5f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2973,3 +2973,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 48c6e269a5..9330c7ab76 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -2517,3 +2517,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index a8b0c6aca7..ea4555d39e 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2717,3 +2717,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 6c00b8440b..3e625fa4e9 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -3141,6 +3141,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index f866e5d6f3..46b4a04f65 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2934,6 +2934,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 4f2db8cb9b..36a94c9210 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2833,6 +2833,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index a73473ee32..f79aba6aab 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2830,6 +2830,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index dc7e27db2a..4a6acc08e0 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -3162,6 +3162,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 2ee97f42fb..931109dab1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2798,6 +2798,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index a7ada1ea53..7ab9073e3a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2749,6 +2749,10 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F
 GLIBC_2.5 __readlinkat_chk F
 GLIBC_2.5 inet6_opt_append F
 GLIBC_2.5 inet6_opt_find F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index f41ab77c1e..e11876f6ab 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2768,3 +2768,7 @@  GLIBC_2.41 sched_setattr F
 GLIBC_2.42 __inet_ntop_chk F
 GLIBC_2.42 __inet_pton_chk F
 GLIBC_2.42 pthread_gettid_np F
+GLIBC_2.42 uabs F
+GLIBC_2.42 uimaxabs F
+GLIBC_2.42 ulabs F
+GLIBC_2.42 ullabs F