Back to index

glibc  2.9
Defines | Functions
dl-conflict.c File Reference
#include <errno.h>
#include <libintl.h>
#include <stdlib.h>
#include <unistd.h>
#include <ldsodefs.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/types.h>
#include "dynamic-link.h"

Go to the source code of this file.

Defines

#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)
#define CHECK_STATIC_TLS(ref_map, sym_map)   ((void) 0)
#define TRY_STATIC_TLS(ref_map, sym_map)   (0)

Functions

void _dl_resolve_conflicts (struct link_map *l, ElfW(Rela)*conflict, ElfW(Rela)*conflictend)

Define Documentation

#define CHECK_STATIC_TLS (   ref_map,
  sym_map 
)    ((void) 0)
#define RESOLVE (   ref,
  version,
  flags 
)    (*ref = NULL, 0)
#define RESOLVE_CONFLICT_FIND_MAP (   map,
  r_offset 
)
Value:
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)
#define RESOLVE_MAP (   ref,
  version,
  flags 
)    (*ref = NULL, NULL)
#define TRY_STATIC_TLS (   ref_map,
  sym_map 
)    (0)

Function Documentation

void _dl_resolve_conflicts ( struct link_map l,
ElfW(Rela)*  conflict,
ElfW(Rela)*  conflictend 
)

Definition at line 32 of file dl-conflict.c.

{
#if ! ELF_MACHINE_NO_RELA
  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
    _dl_debug_printf ("\nconflict processing: %s\n",
                    l->l_name[0] ? l->l_name : rtld_progname);

  {
    /* Do the conflict relocation of the object and library GOT and other
       data.  */

    /* 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)

    /* 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;

#include "dynamic-link.h"

    /* Override these, defined in dynamic-link.h.  */
#undef CHECK_STATIC_TLS
#define CHECK_STATIC_TLS(ref_map, sym_map) ((void) 0)
#undef TRY_STATIC_TLS
#define TRY_STATIC_TLS(ref_map, sym_map) (0)

    GL(dl_num_cache_relocations) += conflictend - conflict;

    for (; conflict < conflictend; ++conflict)
      elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset);
  }
#endif
}

Here is the call graph for this function: