about summary refs log tree commit diff
path: root/elf/dl-conflict.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-conflict.c')
-rw-r--r--elf/dl-conflict.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c
index 70f14b04cd..18e8f2edbc 100644
--- a/elf/dl-conflict.c
+++ b/elf/dl-conflict.c
@@ -27,6 +27,25 @@
 #include <sys/types.h>
 #include "dynamic-link.h"
 
+#ifndef NESTING
+
+
+    /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code.  */
+#define RESOLVE_MAP(ref, version, flags) (*ref = NULL, NULL)
+#define RESOLVE(ref, version, flags) (*ref = NULL, 0)
+#define RESOLVE_CONFLICT_FIND_MAP(map, r_offset) \
+  do {									      \
+    while ((resolve_conflict_map->l_map_end < (ElfW(Addr)) (r_offset))	      \
+	   || (resolve_conflict_map->l_map_start > (ElfW(Addr)) (r_offset)))  \
+      resolve_conflict_map = resolve_conflict_map->l_next;		      \
+									      \
+    (map) = resolve_conflict_map;					      \
+  } while (0)
+
+#include "dynamic-link.h"
+
+#endif /* n NESTING */
+
 void
 _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
 		       ElfW(Rela) *conflictend)
@@ -39,6 +58,8 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
     /* Do the conflict relocation of the object and library GOT and other
        data.  */
 
+#ifdef NESTING
+
     /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code.  */
 #define RESOLVE_MAP(ref, version, flags) (*ref = NULL, NULL)
 #define RESOLVE(ref, version, flags) (*ref = NULL, 0)
@@ -51,13 +72,19 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
     (map) = resolve_conflict_map;					      \
   } while (0)
 
+#endif /* NESTING */
+
     /* Prelinking makes no sense for anything but the main namespace.  */
     assert (l->l_ns == LM_ID_BASE);
     struct link_map *resolve_conflict_map __attribute__ ((__unused__))
       = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
 
+#ifdef NESTING
+
 #include "dynamic-link.h"
 
+#endif /* NESTING */
+
     /* Override these, defined in dynamic-link.h.  */
 #undef CHECK_STATIC_TLS
 #define CHECK_STATIC_TLS(ref_map, sym_map) ((void) 0)