Lines Matching refs:main_map
220 audit_list_add_dynamic_tag (struct audit_list *list, struct link_map *main_map, in audit_list_add_dynamic_tag() argument
223 ElfW(Dyn) *info = main_map->l_info[ADDRIDX (tag)]; in audit_list_add_dynamic_tag()
224 const char *strtab = (const char *) D_PTR (main_map, l_info[DT_STRTAB]); in audit_list_add_dynamic_tag()
809 do_preload (const char *fname, struct link_map *main_map, const char *where) in do_preload() argument
817 args.loader = main_map; in do_preload()
873 handle_preload_list (const char *preloadlist, struct link_map *main_map, in handle_preload_list() argument
898 npreloads += do_preload (fname, main_map, where); in handle_preload_list()
1054 load_audit_modules (struct link_map *main_map, struct audit_list *audit_list) in load_audit_modules() argument
1070 _dl_audit_objopen (main_map, LM_ID_BASE); in load_audit_modules()
1078 rtld_chain_load (struct link_map *main_map, char *argv0) in rtld_chain_load() argument
1084 if (main_map->l_info[DT_SONAME] != NULL in rtld_chain_load()
1086 ((const char *) D_PTR (main_map, l_info[DT_STRTAB]) in rtld_chain_load()
1087 + main_map->l_info[DT_SONAME]->d_un.d_val)) == 0) in rtld_chain_load()
1092 if (__glibc_unlikely (main_map->l_info[DT_NEEDED] != NULL)) in rtld_chain_load()
1097 for (size_t i = 0; i < main_map->l_phnum; ++i) in rtld_chain_load()
1098 if (main_map->l_phdr[i].p_type == PT_INTERP) in rtld_chain_load()
1117 rtld_setup_main_map (struct link_map *main_map) in rtld_setup_main_map() argument
1121 const ElfW(Phdr) *phdr = main_map->l_phdr; in rtld_setup_main_map()
1122 ElfW(Word) phnum = main_map->l_phnum; in rtld_setup_main_map()
1126 main_map->l_map_end = 0; in rtld_setup_main_map()
1127 main_map->l_text_end = 0; in rtld_setup_main_map()
1129 main_map->l_map_start = ~0; in rtld_setup_main_map()
1131 ++main_map->l_direct_opencount; in rtld_setup_main_map()
1132 main_map->l_contiguous = 1; in rtld_setup_main_map()
1155 main_map->l_addr = (ElfW(Addr)) phdr - ph->p_vaddr; in rtld_setup_main_map()
1160 main_map->l_ld = (void *) main_map->l_addr + ph->p_vaddr; in rtld_setup_main_map()
1161 main_map->l_ld_readonly = (ph->p_flags & PF_W) == 0; in rtld_setup_main_map()
1170 _dl_rtld_libname.name = ((const char *) main_map->l_addr in rtld_setup_main_map()
1206 mapstart = (main_map->l_addr in rtld_setup_main_map()
1208 if (main_map->l_map_start > mapstart) in rtld_setup_main_map()
1209 main_map->l_map_start = mapstart; in rtld_setup_main_map()
1211 if (main_map->l_contiguous && expected_load_address != 0 in rtld_setup_main_map()
1213 main_map->l_contiguous = 0; in rtld_setup_main_map()
1216 allocend = main_map->l_addr + ph->p_vaddr + ph->p_memsz; in rtld_setup_main_map()
1217 if (main_map->l_map_end < allocend) in rtld_setup_main_map()
1218 main_map->l_map_end = allocend; in rtld_setup_main_map()
1219 if ((ph->p_flags & PF_X) && allocend > main_map->l_text_end) in rtld_setup_main_map()
1220 main_map->l_text_end = allocend; in rtld_setup_main_map()
1236 main_map->l_tls_blocksize = ph->p_memsz; in rtld_setup_main_map()
1237 main_map->l_tls_align = ph->p_align; in rtld_setup_main_map()
1239 main_map->l_tls_firstbyte_offset = 0; in rtld_setup_main_map()
1241 main_map->l_tls_firstbyte_offset = (ph->p_vaddr in rtld_setup_main_map()
1243 main_map->l_tls_initimage_size = ph->p_filesz; in rtld_setup_main_map()
1244 main_map->l_tls_initimage = (void *) ph->p_vaddr; in rtld_setup_main_map()
1247 GL(dl_tls_max_dtv_idx) = main_map->l_tls_modid = 1; in rtld_setup_main_map()
1256 main_map->l_relro_addr = ph->p_vaddr; in rtld_setup_main_map()
1257 main_map->l_relro_size = ph->p_memsz; in rtld_setup_main_map()
1266 _dl_process_pt_note (main_map, -1, &ph[-1]); in rtld_setup_main_map()
1269 _dl_process_pt_gnu_property (main_map, -1, &ph[-1]); in rtld_setup_main_map()
1275 if (main_map->l_tls_initimage != NULL) in rtld_setup_main_map()
1276 main_map->l_tls_initimage in rtld_setup_main_map()
1277 = (char *) main_map->l_tls_initimage + main_map->l_addr; in rtld_setup_main_map()
1278 if (! main_map->l_map_end) in rtld_setup_main_map()
1279 main_map->l_map_end = ~0; in rtld_setup_main_map()
1280 if (! main_map->l_text_end) in rtld_setup_main_map()
1281 main_map->l_text_end = ~0; in rtld_setup_main_map()
1358 struct link_map *main_map; in dl_main() local
1603 main_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded; in dl_main()
1606 rtld_chain_load (main_map, argv0); in dl_main()
1608 phdr = main_map->l_phdr; in dl_main()
1609 phnum = main_map->l_phnum; in dl_main()
1614 main_map->l_name = (char *) ""; in dl_main()
1615 *user_entry = main_map->l_entry; in dl_main()
1618 main_map->l_main_map = 1; in dl_main()
1652 main_map = _dl_new_object ((char *) "", "", lt_executable, NULL, in dl_main()
1654 assert (main_map != NULL); in dl_main()
1655 main_map->l_phdr = phdr; in dl_main()
1656 main_map->l_phnum = phnum; in dl_main()
1657 main_map->l_entry = *user_entry; in dl_main()
1661 _dl_add_to_namespace_list (main_map, LM_ID_BASE); in dl_main()
1662 assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded); in dl_main()
1683 bool has_interp = rtld_setup_main_map (main_map); in dl_main()
1708 elf_get_dynamic_info (main_map, false, false); in dl_main()
1713 if (main_map->l_info[DT_SONAME] != NULL in dl_main()
1714 && (strcmp (((const char *) D_PTR (main_map, l_info[DT_STRTAB]) in dl_main()
1715 + main_map->l_info[DT_SONAME]->d_un.d_val), LIBC_SO) in dl_main()
1717 GL(dl_ns)[LM_ID_BASE].libc_map = main_map; in dl_main()
1720 _dl_setup_hash (main_map); in dl_main()
1729 if (main_map->l_ld == NULL) in dl_main()
1738 setup_vdso (main_map, &first_preload); in dl_main()
1760 main_map->l_next = &GL(dl_rtld_map); in dl_main()
1761 GL(dl_rtld_map).l_prev = main_map; in dl_main()
1798 audit_list_add_dynamic_tag (&state.audit_list, main_map, DT_AUDIT); in dl_main()
1799 audit_list_add_dynamic_tag (&state.audit_list, main_map, DT_DEPAUDIT); in dl_main()
1823 load_audit_modules (main_map, &state.audit_list); in dl_main()
1835 elf_setup_debug_entry (main_map, r); in dl_main()
1844 _dl_audit_activity_map (main_map, LA_ACT_ADD); in dl_main()
1857 npreloads += handle_preload_list (state.preloadlist, main_map, in dl_main()
1866 npreloads += handle_preload_list (state.preloadarg, main_map, in dl_main()
1937 npreloads += do_preload (p, main_map, preload_file); in dl_main()
1944 npreloads += do_preload (p, main_map, preload_file); in dl_main()
1980 _dl_map_object_deps (main_map, preloads, npreloads, in dl_main()
1986 for (i = main_map->l_searchlist.r_nlist; i > 0; ) in dl_main()
1987 main_map->l_searchlist.r_list[--i]->l_global = 1; in dl_main()
1994 for (i = 1; i < main_map->l_searchlist.r_nlist; ++i) in dl_main()
1995 if (main_map->l_searchlist.r_list[i] == &GL(dl_rtld_map)) in dl_main()
1999 if (__glibc_likely (i < main_map->l_searchlist.r_nlist)) in dl_main()
2007 GL(dl_rtld_map).l_prev = main_map->l_searchlist.r_list[i - 1]; in dl_main()
2010 GL(dl_rtld_map).l_next = (i + 1 < main_map->l_searchlist.r_nlist in dl_main()
2011 ? main_map->l_searchlist.r_list[i + 1] in dl_main()
2075 struct link_map *l = main_map; in dl_main()
2086 ElfW(Dyn) *dyn = main_map->l_ld; in dl_main()
2116 else if (! main_map->l_info[DT_NEEDED]) in dl_main()
2120 for (l = state.mode_trace_program ? main_map : main_map->l_next; in dl_main()
2141 result = _dl_lookup_symbol_x (_dl_argv[i], main_map, in dl_main()
2142 &ref, main_map->l_scope, in dl_main()
2166 i = main_map->l_searchlist.r_nlist; in dl_main()
2169 struct link_map *l = main_map->l_initfini[i]; in dl_main()
2187 for (map = main_map; map != NULL; map = map->l_next) in dl_main()
2255 GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist = &main_map->l_searchlist; in dl_main()
2272 for (struct link_map *l = main_map; l != NULL; l = l->l_next) in dl_main()
2276 _rtld_main_check (main_map, _dl_argv[0]); in dl_main()
2295 unsigned i = main_map->l_searchlist.r_nlist; in dl_main()
2298 struct link_map *l = main_map->l_initfini[i]; in dl_main()
2371 __rtld_malloc_init_real (main_map); in dl_main()
2381 _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0); in dl_main()