Back to index

glibc  2.9
Defines | Functions
dl-lookupcfg.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define DL_UNMAP(map)   _dl_unmap (map)


void internal_function _dl_unmap (struct link_map *map)

Define Documentation

#define DL_UNMAP (   map)    _dl_unmap (map)

Definition at line 28 of file dl-lookupcfg.h.

Definition at line 20 of file dl-lookupcfg.h.

Function Documentation

void internal_function _dl_unmap ( struct link_map map)

Definition at line 267 of file dl-fptr.c.

  ElfW(Addr) *ftab = map->l_mach.fptr_table;
  struct fdesc *head = NULL, *tail = NULL;
  size_t i;

  __munmap ((void *) map->l_map_start,
           map->l_map_end - map->l_map_start);

  if (ftab == NULL)

  /* String together the fdesc structures that are being freed.  */
  for (i = 0; i < map->l_mach.fptr_table_len; ++i)
      if (ftab[i])
         *(struct fdesc **) ftab[i] = head;
         head = (struct fdesc *) ftab[i];
         if (tail == NULL)
           tail = head;

  /* Prepend the new list to the free_list: */
  if (tail)
      tail->ip = (ElfW(Addr)) local.free_list;
    while (! COMPARE_AND_SWAP ((ElfW(Addr) *) &local.free_list,
                            tail->ip, (ElfW(Addr)) head));

  __munmap (ftab, (map->l_mach.fptr_table_len
                 * sizeof (map->l_mach.fptr_table[0])));

  map->l_mach.fptr_table = NULL;

Here is the call graph for this function: