about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/dl-librecon.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-02-21 08:32:32 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-05-16 15:03:49 -0300
commitb46d250656794e63a2946c481fda29271342dd1a (patch)
treec2e056aa6ae5eb18f79a356b4bbd2f645446291c /sysdeps/unix/sysv/linux/dl-librecon.h
parent97a912f7a832a662960749948049e15f3aecb2a7 (diff)
downloadglibc-b46d250656794e63a2946c481fda29271342dd1a.tar.gz
glibc-b46d250656794e63a2946c481fda29271342dd1a.tar.xz
glibc-b46d250656794e63a2946c481fda29271342dd1a.zip
Remove kernel version check
The kernel version check is used to avoid glibc to run on older
kernels where some syscall are not available and fallback code are
not enabled to handle graciously fail.  However, it does not prevent
if the kernel does not correctly advertise its version through
vDSO note, uname or procfs.

Also kernel version checks are sometime not desirable by users,
where they want to deploy on different system with different kernel
version knowing the minimum set of syscall is always presented on
such systems.

The kernel version check has been removed along with the
LD_ASSUME_KERNEL environment variable.  The minimum kernel used to
built glibc is still provided through NT_GNU_ABI_TAG ELF note and
also printed when libc.so is issued.

Checked on x86_64-linux-gnu.
Diffstat (limited to 'sysdeps/unix/sysv/linux/dl-librecon.h')
-rw-r--r--sysdeps/unix/sysv/linux/dl-librecon.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-librecon.h b/sysdeps/unix/sysv/linux/dl-librecon.h
deleted file mode 100644
index dfebcea4d8..0000000000
--- a/sysdeps/unix/sysv/linux/dl-librecon.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Optional code to distinguish library flavours.
-   Copyright (C) 2001-2022 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/>.  */
-
-#ifndef _DL_LIBRECON_H
-#define _DL_LIBRECON_H	1
-
-static inline void __attribute__ ((unused, always_inline))
-_dl_osversion_init (char *assume_kernel)
-{
-  unsigned long int i, j, osversion = 0;
-  char *p = assume_kernel, *q;
-
-  for (i = 0; i < 3; i++, p = q + 1)
-    {
-      j = _dl_strtoul (p, &q);
-      if (j >= 255 || p == q || (i < 2 && *q && *q != '.'))
-	{
-	  osversion = 0;
-	  break;
-	}
-      osversion |= j << (16 - 8 * i);
-      if (!*q)
-	break;
-    }
-  if (osversion)
-    GLRO(dl_osversion) = osversion;
-}
-
-/* Recognizing extra environment variables.  */
-#define EXTRA_LD_ENVVARS_13 \
-    if (memcmp (envline, "ASSUME_KERNEL", 13) == 0)			      \
-      {									      \
-	_dl_osversion_init (&envline[14]);				      \
-	break;								      \
-      }
-
-#define DL_OSVERSION_INIT \
-  do {									      \
-    char *assume_kernel = getenv ("LD_ASSUME_KERNEL");			      \
-    if (assume_kernel)							      \
-      _dl_osversion_init (assume_kernel);				      \
-  } while (0)
-
-#endif /* dl-librecon.h */