about summary refs log tree commit diff
path: root/elf/dl-version.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-08-25 18:46:41 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-08-25 18:46:43 +0200
commit89baed0b93639180fd7d0ba922873b003649c7af (patch)
tree3d560f9563c042eb46fdd0a088d24e470b5e907d /elf/dl-version.c
parent025a8cce63a1d9b3ea9e84d0e844f14ec872e184 (diff)
downloadglibc-89baed0b93639180fd7d0ba922873b003649c7af.tar.gz
glibc-89baed0b93639180fd7d0ba922873b003649c7af.tar.xz
glibc-89baed0b93639180fd7d0ba922873b003649c7af.zip
Revert "Detect ld.so and libc.so version inconsistency during startup"
This reverts commit 6f85dbf102ad7982409ba0fe96886caeb6389fef.

Once this change hits the release branches, it will require relinking
of all statically linked applications before static dlopen works
again, for the majority of updates on release branches: The NEWS file
is regularly updated with bug references, so the __libc_early_init
suffix changes, and static dlopen cannot find the function anymore.

While this ABI check is still technically correct (we do require
rebuilding & relinking after glibc updates to keep static dlopen
working), it is too drastic for stable release branches.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/dl-version.c')
-rw-r--r--elf/dl-version.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/elf/dl-version.c b/elf/dl-version.c
index d9ec44eed6..cda0889209 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -23,8 +23,6 @@
 #include <string.h>
 #include <ldsodefs.h>
 #include <_itoa.h>
-#include <gnu/lib-names.h>
-#include <libc-early-init.h>
 
 #include <assert.h>
 
@@ -361,22 +359,6 @@ _dl_check_map_versions (struct link_map *map, int verbose, int trace_mode)
 	}
     }
 
-  /* Detect a libc.so loaded into this namespace.  The
-     __libc_early_init lookup below means that we have to do this
-     after parsing the version data.  */
-  if (GL(dl_ns)[map->l_ns].libc_map == NULL
-      && map->l_info[DT_SONAME] != NULL
-      && strcmp (((const char *) D_PTR (map, l_info[DT_STRTAB])
-		  + map->l_info[DT_SONAME]->d_un.d_val), LIBC_SO) == 0)
-    {
-      /* Look up this symbol early to trigger a mismatch error before
-	 relocation (which may call IFUNC resolvers, and those can
-	 have an internal ABI dependency).  */
-      GL(dl_ns)[map->l_ns].libc_map_early_init
-	= _dl_lookup_libc_early_init (map);
-      GL(dl_ns)[map->l_ns].libc_map = map;
-    }
-
   /* When there is a DT_VERNEED entry with libc.so on DT_NEEDED, issue
      an error if there is a DT_RELR entry without GLIBC_ABI_DT_RELR
      dependency.  */