(DISTINGUISH_LIB_VERSIONS): Don't relocate DT_STRTAB a second time.
[kopensolaris-gnu/glibc.git] / sysdeps / unix / sysv / linux / i386 / dl-librecon.h
index ef2c4bb..84b4396 100644 (file)
       /* 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])                                       \
+      if (_dl_loaded->l_info[DT_NEEDED])                                     \
        {                                                                     \
          /* We have dependencies.  */                                        \
-         const char *strtab = ((void *) main_map->l_addr                     \
-                               + main_map->l_info[DT_STRTAB]->d_un.d_ptr);   \
          const ElfW(Dyn) *d;                                                 \
+         const char *strtab;                                                 \
                                                                              \
-         for (d = main_map->l_ld; d->d_tag != DT_NULL; ++d)                  \
+         strtab = (const char *) _dl_loaded->l_info[DT_STRTAB]->d_un.d_ptr;  \
+                                                                             \
+         for (d = _dl_loaded->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;                                                          \
@@ -54,4 +55,7 @@
        break;                                                                \
       }
 
+/* Extra unsecure variables.  */
+#define EXTRA_UNSECURE_ENVVARS "LD_AOUT_LIBRARY_PATH", "LD_AOUT_PRELOAD"
+
 #endif /* dl-librecon.h */