71 lines
2.2 KiB
Diff
71 lines
2.2 KiB
Diff
|
--- glibc-2.3.3.old/elf/rtld.c 2004-10-26 21:41:41.989117872 -0400
|
||
|
+++ glibc-2.3.3/elf/rtld.c 2004-10-26 21:45:15.015732904 -0400
|
||
|
@@ -1306,67 +1259,6 @@
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-
|
||
|
-#if defined(__i386__) || defined(__alpha__) || (defined(__sparc__) && !defined(__arch64__))
|
||
|
- /*
|
||
|
- * Modifications by Red Hat Software
|
||
|
- *
|
||
|
- * Deal with the broken binaries from the non-versioned ages of glibc.
|
||
|
- * If a binary does not have version information enabled, we assume that
|
||
|
- * it is a glibc 2.0 binary and we load a compatibility library to try to
|
||
|
- * overcome binary incompatibilities.
|
||
|
- * Blame: gafton@redhat.com
|
||
|
- */
|
||
|
-#define LIB_NOVERSION "/lib/libNoVersion.so.1"
|
||
|
-
|
||
|
- if (__builtin_expect (main_map->l_info[DT_NUM + DT_THISPROCNUM
|
||
|
- + DT_VERSIONTAGIDX (DT_VERNEED)]
|
||
|
- == NULL, 0)
|
||
|
- && (main_map->l_info[DT_DEBUG]
|
||
|
- || !(GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)))
|
||
|
- {
|
||
|
- struct stat test_st;
|
||
|
- int test_fd;
|
||
|
- int can_load;
|
||
|
-
|
||
|
- HP_TIMING_NOW (start);
|
||
|
-
|
||
|
-/* _dl_sysdep_message("Loading compatibility library... ", NULL); */
|
||
|
-
|
||
|
- can_load = 1;
|
||
|
- test_fd = __open (LIB_NOVERSION, O_RDONLY);
|
||
|
- if (test_fd < 0) {
|
||
|
- can_load = 0;
|
||
|
-/* _dl_sysdep_message(" Can't find " LIB_NOVERSION "\n", NULL); */
|
||
|
- } else {
|
||
|
- if (__fxstat (_STAT_VER, test_fd, &test_st) < 0 || test_st.st_size == 0) {
|
||
|
- can_load = 0;
|
||
|
-/* _dl_sysdep_message(" Can't stat " LIB_NOVERSION "\n", NULL); */
|
||
|
- }
|
||
|
- }
|
||
|
-
|
||
|
- if (test_fd >= 0) /* open did no fail.. */
|
||
|
- __close(test_fd); /* avoid fd leaks */
|
||
|
-
|
||
|
- if (can_load != 0) {
|
||
|
- struct link_map *new_map;
|
||
|
- new_map = _dl_map_object (main_map, LIB_NOVERSION,
|
||
|
- 1, lt_library, 0, 0, LM_ID_BASE);
|
||
|
- if (++new_map->l_opencount == 1) {
|
||
|
- /* It is no duplicate. */
|
||
|
- ++npreloads;
|
||
|
-/* _dl_sysdep_message(" DONE\n", NULL); */
|
||
|
- } else {
|
||
|
-/* _dl_sysdep_message(" FAILED\n", NULL); */
|
||
|
- }
|
||
|
- }
|
||
|
-
|
||
|
- HP_TIMING_NOW (stop);
|
||
|
- HP_TIMING_DIFF (diff, start, stop);
|
||
|
- HP_TIMING_ACCUM_NT (load_time, diff);
|
||
|
- }
|
||
|
-#endif
|
||
|
-
|
||
|
if (__builtin_expect (npreloads, 0) != 0)
|
||
|
{
|
||
|
/* Set up PRELOADS with a vector of the preloaded libraries. */
|