summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-04 10:27:15 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-05-16 15:03:49 -0300
commitc628c2296392ed3bf2cb8d8470668e64fe53389f (patch)
tree9b81205495c9f84e216555e5630ece715a1c1523 /sysdeps
parentb46d250656794e63a2946c481fda29271342dd1a (diff)
downloadglibc-c628c2296392ed3bf2cb8d8470668e64fe53389f.tar.gz
glibc-c628c2296392ed3bf2cb8d8470668e64fe53389f.tar.xz
glibc-c628c2296392ed3bf2cb8d8470668e64fe53389f.zip
elf: Remove ldconfig kernel version check
Now that it was removed on libc.so.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-cache.h2
-rw-r--r--sysdeps/generic/ldconfig.h14
-rw-r--r--sysdeps/unix/sysv/linux/arm/readelflib.c18
-rw-r--r--sysdeps/unix/sysv/linux/ia64/readelflib.c18
-rw-r--r--sysdeps/unix/sysv/linux/mips/readelflib.c18
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/readelflib.c18
-rw-r--r--sysdeps/unix/sysv/linux/riscv/readelflib.c18
-rw-r--r--sysdeps/unix/sysv/linux/s390/readelflib.c18
-rw-r--r--sysdeps/unix/sysv/linux/sparc/readelflib.c18
-rw-r--r--sysdeps/unix/sysv/linux/x86/readelflib.c18
10 files changed, 69 insertions, 91 deletions
diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
index df385dca2d..93d4bea930 100644
--- a/sysdeps/generic/dl-cache.h
+++ b/sysdeps/generic/dl-cache.h
@@ -95,7 +95,7 @@ struct file_entry_new
       uint32_t key, value;	/* String table indices.  */
     };
   };
-  uint32_t osversion;		/* Required OS version.	 */
+  uint32_t osversion_unused;	/* Required OS version (unused).  */
   uint64_t hwcap;		/* Hwcap entry.	 */
 };
 
diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h
index 94f008bd90..7cc898db61 100644
--- a/sysdeps/generic/ldconfig.h
+++ b/sysdeps/generic/ldconfig.h
@@ -70,8 +70,7 @@ const char *glibc_hwcaps_subdirectory_name
 
 extern void add_to_cache (const char *path, const char *filename,
 			  const char *soname, int flags,
-			  unsigned int osversion, unsigned int isa_level,
-			  uint64_t hwcap,
+			  unsigned int isa_level, uint64_t hwcap,
 			  struct glibc_hwcaps_subdirectory *);
 
 extern void init_aux_cache (void);
@@ -79,28 +78,23 @@ extern void init_aux_cache (void);
 extern void load_aux_cache (const char *aux_cache_name);
 
 extern int search_aux_cache (struct stat *stat_buf, int *flags,
-			     unsigned int *osversion,
 			     unsigned int *isa_level, char **soname);
 
 extern void add_to_aux_cache (struct stat *stat_buf, int flags,
-			      unsigned int osversion,
 			      unsigned int isa_level, const char *soname);
 
 extern void save_aux_cache (const char *aux_cache_name);
 
 /* Declared in readlib.c.  */
 extern int process_file (const char *real_file_name, const char *file_name,
-			 const char *lib, int *flag,
-			 unsigned int *osversion, unsigned int *isa_level,
-			 char **soname, int is_link,
-			 struct stat *stat_buf);
+			 const char *lib, int *flag, unsigned int *isa_level,
+			 char **soname, int is_link, struct stat *stat_buf);
 
 extern char *implicit_soname (const char *lib, int flag);
 
 /* Declared in readelflib.c.  */
 extern int process_elf_file (const char *file_name, const char *lib,
-			     int *flag, unsigned int *osversion,
-			     unsigned int *isa_level, char **soname,
+			     int *flag, unsigned int *isa_level, char **soname,
 			     void *file_contents, size_t file_length);
 
 /* Declared in chroot_canon.c.  */
diff --git a/sysdeps/unix/sysv/linux/arm/readelflib.c b/sysdeps/unix/sysv/linux/arm/readelflib.c
index 428b0f85ff..d4956e2d25 100644
--- a/sysdeps/unix/sysv/linux/arm/readelflib.c
+++ b/sysdeps/unix/sysv/linux/arm/readelflib.c
@@ -17,19 +17,17 @@
 
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   int ret;
@@ -38,8 +36,8 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
     {
       Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
 
-      ret = process_elf32_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf32_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
 
       if (!ret && EF_ARM_EABI_VERSION (elf32_header->e_flags) == EF_ARM_EABI_VER5)
 	{
@@ -57,8 +55,8 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
     }
   else
     {
-      ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       /* AArch64 libraries are always libc.so.6+.  */
       if (!ret)
 	*flag = FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6;
diff --git a/sysdeps/unix/sysv/linux/ia64/readelflib.c b/sysdeps/unix/sysv/linux/ia64/readelflib.c
index cd0918176a..bfd3558675 100644
--- a/sysdeps/unix/sysv/linux/ia64/readelflib.c
+++ b/sysdeps/unix/sysv/linux/ia64/readelflib.c
@@ -17,30 +17,28 @@
 
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   int ret;
 
   if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
-    return process_elf32_file (file_name, lib, flag, osversion, isa_level,
-			       soname, file_contents, file_length);
+    return process_elf32_file (file_name, lib, flag, isa_level, soname,
+			       file_contents, file_length);
   else
     {
-      ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       /* Intel 64bit libraries are always libc.so.6+.  */
       if (!ret)
 	*flag = FLAG_IA64_LIB64|FLAG_ELF_LIBC6;
diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c
index cfa6a12c1a..8c66ba1fa1 100644
--- a/sysdeps/unix/sysv/linux/mips/readelflib.c
+++ b/sysdeps/unix/sysv/linux/mips/readelflib.c
@@ -17,19 +17,17 @@
 
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   union
     {
@@ -43,8 +41,8 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
   elf_header.eh = file_contents;
   if (elf_header.eh->e_ident [EI_CLASS] == ELFCLASS32)
     {
-      ret = process_elf32_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf32_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       if (!ret)
 	{
 	  Elf32_Word flags = elf_header.eh32->e_flags;
@@ -60,8 +58,8 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
     }
   else
     {
-      ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       /* n64 libraries are always libc.so.6+.  */
       if (!ret)
 	{
diff --git a/sysdeps/unix/sysv/linux/powerpc/readelflib.c b/sysdeps/unix/sysv/linux/powerpc/readelflib.c
index 90ea9bf6f7..3b6902e35b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/readelflib.c
+++ b/sysdeps/unix/sysv/linux/powerpc/readelflib.c
@@ -18,30 +18,28 @@
 
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   int ret;
 
   if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
-    return process_elf32_file (file_name, lib, flag, osversion, isa_level,
-			       soname, file_contents, file_length);
+    return process_elf32_file (file_name, lib, flag, isa_level, soname,
+			       file_contents, file_length);
   else
     {
-      ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       /* PowerPC 64bit libraries are always libc.so.6+.  */
       if (!ret)
 	*flag = FLAG_POWERPC_LIB64|FLAG_ELF_LIBC6;
diff --git a/sysdeps/unix/sysv/linux/riscv/readelflib.c b/sysdeps/unix/sysv/linux/riscv/readelflib.c
index 29f1ac676f..db882c066f 100644
--- a/sysdeps/unix/sysv/linux/riscv/readelflib.c
+++ b/sysdeps/unix/sysv/linux/riscv/readelflib.c
@@ -18,12 +18,10 @@
 
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* The ELF flags supported by our current glibc port:
@@ -40,8 +38,8 @@ int process_elf64_file (const char *file_name, const char *lib,
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
@@ -54,14 +52,14 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
 
   if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
     {
-      ret = process_elf32_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf32_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       flags = elf32_header->e_flags;
     }
   else
     {
-      ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       flags = elf64_header->e_flags;
     }
 
diff --git a/sysdeps/unix/sysv/linux/s390/readelflib.c b/sysdeps/unix/sysv/linux/s390/readelflib.c
index e3f51cc34d..063fce9d18 100644
--- a/sysdeps/unix/sysv/linux/s390/readelflib.c
+++ b/sysdeps/unix/sysv/linux/s390/readelflib.c
@@ -17,30 +17,28 @@
 
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   int ret;
 
   if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
-    return process_elf32_file (file_name, lib, flag, osversion, isa_level,
-			       soname, file_contents, file_length);
+    return process_elf32_file (file_name, lib, flag, isa_level, soname,
+			       file_contents, file_length);
   else
     {
-      ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+			       	file_contents, file_length);
       /* S/390 64bit libraries are always libc.so.6+.  */
       if (!ret)
 	*flag = FLAG_S390_LIB64|FLAG_ELF_LIBC6;
diff --git a/sysdeps/unix/sysv/linux/sparc/readelflib.c b/sysdeps/unix/sysv/linux/sparc/readelflib.c
index bc7b1f4f90..97d441693c 100644
--- a/sysdeps/unix/sysv/linux/sparc/readelflib.c
+++ b/sysdeps/unix/sysv/linux/sparc/readelflib.c
@@ -17,30 +17,28 @@
 
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   int ret;
 
   if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
-    return process_elf32_file (file_name, lib, flag, osversion, isa_level,
-			       soname, file_contents, file_length);
+    return process_elf32_file (file_name, lib, flag, isa_level, soname,
+			       file_contents, file_length);
   else
     {
-      ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-				soname, file_contents, file_length);
+      ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+				file_contents, file_length);
       /* Sparc 64bit libraries are always libc.so.6+.  */
       if (!ret)
 	*flag = FLAG_SPARC_LIB64|FLAG_ELF_LIBC6;
diff --git a/sysdeps/unix/sysv/linux/x86/readelflib.c b/sysdeps/unix/sysv/linux/x86/readelflib.c
index 8863b752a2..cfa2a9dd22 100644
--- a/sysdeps/unix/sysv/linux/x86/readelflib.c
+++ b/sysdeps/unix/sysv/linux/x86/readelflib.c
@@ -16,19 +16,17 @@
    <https://www.gnu.org/licenses/>.  */
 
 int process_elf32_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 int process_elf64_file (const char *file_name, const char *lib,
-			int *flag, unsigned int *osversion,
-			unsigned int *isa_level, char **soname,
+			int *flag, unsigned int *isa_level, char **soname,
 			void *file_contents, size_t file_length);
 
 /* Returns 0 if everything is ok, != 0 in case of error.  */
 int
 process_elf_file (const char *file_name, const char *lib, int *flag,
-		  unsigned int *osversion, unsigned int *isa_level,
-		  char **soname, void *file_contents, size_t file_length)
+		  unsigned int *isa_level, char **soname, void *file_contents,
+		  size_t file_length)
 {
   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
   int ret, file_flag = 0;
@@ -67,11 +65,11 @@ failed:
     }
 
   if (elf_header->e_ident[EI_CLASS] == ELFCLASS32)
-    ret = process_elf32_file (file_name, lib, flag, osversion, isa_level,
-			      soname, file_contents, file_length);
+    ret = process_elf32_file (file_name, lib, flag, isa_level, soname,
+			      file_contents, file_length);
   else
-    ret = process_elf64_file (file_name, lib, flag, osversion, isa_level,
-			      soname, file_contents, file_length);
+    ret = process_elf64_file (file_name, lib, flag, isa_level, soname,
+			      file_contents, file_length);
 
   if (!ret && file_flag)
     *flag = file_flag;