[PATCH] elf: Delete obsoleted DISTINGUISH_LIB_VERSIONS
Fangrui Song
maskray@google.com
Sat Aug 7 05:12:11 GMT 2021
and its only definition in i386/dl-librecon.h which essentially
hasn't been updated since 2004.
---
elf/rtld.c | 4 ----
sysdeps/unix/sysv/linux/i386/dl-librecon.h | 25 ----------------------
2 files changed, 29 deletions(-)
diff --git a/elf/rtld.c b/elf/rtld.c
index d733359eaf..4196bae703 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1637,10 +1637,6 @@ dl_main (const ElfW(Phdr) *phdr,
if (main_map->l_ld == NULL)
_exit (1);
- /* We allow here some platform specific code. */
-#ifdef DISTINGUISH_LIB_VERSIONS
- DISTINGUISH_LIB_VERSIONS;
-#endif
_exit (has_interp ? 0 : 2);
}
diff --git a/sysdeps/unix/sysv/linux/i386/dl-librecon.h b/sysdeps/unix/sysv/linux/i386/dl-librecon.h
index 7efe0679b3..e4d90529b8 100644
--- a/sysdeps/unix/sysv/linux/i386/dl-librecon.h
+++ b/sysdeps/unix/sysv/linux/i386/dl-librecon.h
@@ -21,31 +21,6 @@
#include <sysdeps/unix/sysv/linux/dl-librecon.h>
-#define DISTINGUISH_LIB_VERSIONS \
- do \
- { \
- /* We have to find out whether the binary is linked against \
- libc 5 or glibc. We do this by looking at all the DT_NEEDED \
- entries. If one is libc.so.5 this is a libc 5 linked binary. */ \
- if (main_map->l_info[DT_NEEDED]) \
- { \
- /* We have dependencies. */ \
- const ElfW(Dyn) *d; \
- const char *strtab; \
- \
- strtab = (const char *) D_PTR (main_map, l_info[DT_STRTAB]); \
- \
- for (d = main_map->l_ld; d->d_tag != DT_NULL; ++d) \
- if (d->d_tag == DT_NEEDED \
- && strcmp (strtab + d->d_un.d_val, "libc.so.5") == 0) \
- break; \
- \
- /* We print a `5' or `6' depending on the outcome. */ \
- _dl_printf (d->d_tag != DT_NULL ? "5\n" : "6\n"); \
- } \
- } \
- while (0)
-
/* Recognizing extra environment variables. */
#define EXTRA_LD_ENVVARS \
case 15: \
--
2.32.0.605.g8dce9f2422-goog
More information about the Libc-alpha
mailing list