Lines Matching refs:imap

270       struct link_map *imap = maps[i];  in _dl_close_worker()  local
273 assert (imap->l_ns == nsid); in _dl_close_worker()
275 if (!imap->l_map_used) in _dl_close_worker()
277 assert (imap->l_type == lt_loaded && !imap->l_nodelete_active); in _dl_close_worker()
282 if (imap->l_init_called) in _dl_close_worker()
288 imap->l_name, nsid); in _dl_close_worker()
290 if (imap->l_info[DT_FINI_ARRAY] != NULL in _dl_close_worker()
291 || imap->l_info[DT_FINI] != NULL) in _dl_close_worker()
292 _dl_catch_exception (NULL, call_destructors, imap); in _dl_close_worker()
297 _dl_audit_objclose (imap); in _dl_close_worker()
301 imap->l_removed = 1; in _dl_close_worker()
306 if (imap->l_global) in _dl_close_worker()
314 else if (imap->l_type == lt_loaded) in _dl_close_worker()
318 if (imap->l_searchlist.r_list == NULL && imap->l_initfini != NULL) in _dl_close_worker()
328 for (cnt = 1; imap->l_initfini[cnt] != NULL; ++cnt) in _dl_close_worker()
332 imap->l_searchlist.r_list = &imap->l_initfini[cnt + 1]; in _dl_close_worker()
333 imap->l_searchlist.r_nlist = cnt; in _dl_close_worker()
335 new_list = &imap->l_searchlist; in _dl_close_worker()
343 for (size_t cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) in _dl_close_worker()
347 if (imap->l_scope[cnt] != &imap->l_symbolic_searchlist) in _dl_close_worker()
350 ((char *) imap->l_scope[cnt] in _dl_close_worker()
370 #define SCOPE_ELEMS(imap) \ in _dl_close_worker() argument
371 (sizeof (imap->l_scope_mem) / sizeof (imap->l_scope_mem[0])) in _dl_close_worker()
373 if (imap->l_scope != imap->l_scope_mem in _dl_close_worker()
374 && remain < SCOPE_ELEMS (imap)) in _dl_close_worker()
376 new_size = SCOPE_ELEMS (imap); in _dl_close_worker()
377 newp = imap->l_scope_mem; in _dl_close_worker()
381 new_size = imap->l_scope_max; in _dl_close_worker()
391 for (size_t cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) in _dl_close_worker()
393 if (imap->l_scope[cnt] != &imap->l_symbolic_searchlist) in _dl_close_worker()
396 ((char *) imap->l_scope[cnt] in _dl_close_worker()
411 newp[remain++] = imap->l_scope[cnt]; in _dl_close_worker()
415 struct r_scope_elem **old = imap->l_scope; in _dl_close_worker()
417 imap->l_scope = newp; in _dl_close_worker()
420 if (old != imap->l_scope_mem) in _dl_close_worker()
430 imap->l_scope_max = new_size; in _dl_close_worker()
436 imap->l_searchlist.r_list = NULL; in _dl_close_worker()
437 imap->l_searchlist.r_nlist = 0; in _dl_close_worker()
442 if (imap->l_loader != NULL in _dl_close_worker()
443 && imap->l_loader->l_idx != IDX_STILL_USED) in _dl_close_worker()
444 imap->l_loader = NULL; in _dl_close_worker()
521 struct link_map *imap = maps[i]; in _dl_close_worker() local
522 if (!imap->l_map_used) in _dl_close_worker()
524 assert (imap->l_type == lt_loaded); in _dl_close_worker()
530 if (__glibc_unlikely (imap->l_tls_blocksize > 0)) in _dl_close_worker()
535 && ! remove_slotinfo (imap->l_tls_modid, in _dl_close_worker()
537 imap->l_init_called)) in _dl_close_worker()
543 if (imap->l_tls_offset != NO_TLS_OFFSET in _dl_close_worker()
544 && imap->l_tls_offset != FORCED_DYNAMIC_TLS_OFFSET) in _dl_close_worker()
552 || (size_t) imap->l_tls_offset == tls_free_start) in _dl_close_worker()
556 = imap->l_tls_offset - imap->l_tls_blocksize; in _dl_close_worker()
559 tls_free_end = imap->l_tls_offset; in _dl_close_worker()
561 else if (imap->l_tls_offset - imap->l_tls_blocksize in _dl_close_worker()
564 tls_free_end = imap->l_tls_offset; in _dl_close_worker()
573 tls_free_end = imap->l_tls_offset; in _dl_close_worker()
575 = tls_free_end - imap->l_tls_blocksize; in _dl_close_worker()
577 else if ((size_t) imap->l_tls_offset in _dl_close_worker()
580 = imap->l_tls_offset - imap->l_tls_blocksize; in _dl_close_worker()
581 else if (tls_free_end < (size_t) imap->l_tls_offset) in _dl_close_worker()
585 tls_free_end = imap->l_tls_offset; in _dl_close_worker()
587 = tls_free_end - imap->l_tls_blocksize; in _dl_close_worker()
593 tls_free_start = imap->l_tls_firstbyte_offset; in _dl_close_worker()
594 tls_free_end = (imap->l_tls_offset in _dl_close_worker()
595 + imap->l_tls_blocksize); in _dl_close_worker()
597 else if (imap->l_tls_firstbyte_offset == tls_free_end) in _dl_close_worker()
599 tls_free_end = imap->l_tls_offset + imap->l_tls_blocksize; in _dl_close_worker()
600 else if (imap->l_tls_offset + imap->l_tls_blocksize in _dl_close_worker()
603 tls_free_start = imap->l_tls_firstbyte_offset; in _dl_close_worker()
607 else if (imap->l_tls_offset + imap->l_tls_blocksize in _dl_close_worker()
609 GL(dl_tls_static_used) = imap->l_tls_firstbyte_offset; in _dl_close_worker()
613 tls_free_start = imap->l_tls_firstbyte_offset; in _dl_close_worker()
614 tls_free_end = imap->l_tls_offset + imap->l_tls_blocksize; in _dl_close_worker()
616 else if (tls_free_end < imap->l_tls_firstbyte_offset) in _dl_close_worker()
620 tls_free_start = imap->l_tls_firstbyte_offset; in _dl_close_worker()
621 tls_free_end = imap->l_tls_offset + imap->l_tls_blocksize; in _dl_close_worker()
643 && entries[idx].map == imap) in _dl_close_worker()
657 DL_UNMAP (imap); in _dl_close_worker()
667 assert (imap->l_prev != NULL); in _dl_close_worker()
669 if (imap->l_prev == NULL) in _dl_close_worker()
672 ns->_ns_loaded = imap->l_next; in _dl_close_worker()
680 imap->l_prev->l_next = imap->l_next; in _dl_close_worker()
683 if (imap->l_next != NULL) in _dl_close_worker()
684 imap->l_next->l_prev = imap->l_prev; in _dl_close_worker()
687 _dl_find_object_dlclose (imap); in _dl_close_worker()
689 free (imap->l_versions); in _dl_close_worker()
690 if (imap->l_origin != (char *) -1) in _dl_close_worker()
691 free ((char *) imap->l_origin); in _dl_close_worker()
693 free (imap->l_reldeps); in _dl_close_worker()
698 imap->l_name, imap->l_ns); in _dl_close_worker()
701 free (imap->l_name); in _dl_close_worker()
704 struct libname_list *lnp = imap->l_libname; in _dl_close_worker()
715 free (imap->l_initfini); in _dl_close_worker()
718 if (imap->l_scope != imap->l_scope_mem) in _dl_close_worker()
719 free (imap->l_scope); in _dl_close_worker()
721 if (imap->l_phdr_allocated) in _dl_close_worker()
722 free ((void *) imap->l_phdr); in _dl_close_worker()
724 if (imap->l_rpath_dirs.dirs != (void *) -1) in _dl_close_worker()
725 free (imap->l_rpath_dirs.dirs); in _dl_close_worker()
726 if (imap->l_runpath_dirs.dirs != (void *) -1) in _dl_close_worker()
727 free (imap->l_runpath_dirs.dirs); in _dl_close_worker()
730 if (imap == GL(dl_initfirst)) in _dl_close_worker()
733 free (imap); in _dl_close_worker()