Lines Matching refs:shdr

300 		Elf32_Shdr *shdr = elf->shdr;  in save_hashtab()  local
303 void *addr = (void *)(vaddr_t)(shdr[n].sh_addr + in save_hashtab()
306 if (shdr[n].sh_type == SHT_HASH) { in save_hashtab()
308 } else if (shdr[n].sh_type == SHT_GNU_HASH) { in save_hashtab()
310 elf->gnu_hashtab_size = shdr[n].sh_size; in save_hashtab()
314 Elf64_Shdr *shdr = elf->shdr; in save_hashtab() local
317 void *addr = (void *)(vaddr_t)(shdr[n].sh_addr + in save_hashtab()
320 if (shdr[n].sh_type == SHT_HASH) { in save_hashtab()
322 } else if (shdr[n].sh_type == SHT_GNU_HASH) { in save_hashtab()
324 elf->gnu_hashtab_size = shdr[n].sh_size; in save_hashtab()
398 Elf32_Shdr *shdr = elf->shdr; in e32_save_symtab() local
399 size_t str_idx = shdr[tab_idx].sh_link; in e32_save_symtab()
401 elf->dynsymtab = (void *)(shdr[tab_idx].sh_addr + elf->load_addr); in e32_save_symtab()
405 check_range(elf, "Dynsymtab", elf->dynsymtab, shdr[tab_idx].sh_size); in e32_save_symtab()
407 if (shdr[tab_idx].sh_size % sizeof(Elf32_Sym)) in e32_save_symtab()
410 elf->num_dynsyms = shdr[tab_idx].sh_size / sizeof(Elf32_Sym); in e32_save_symtab()
414 elf->dynstr = (void *)(shdr[str_idx].sh_addr + elf->load_addr); in e32_save_symtab()
415 check_range(elf, "Dynstr", elf->dynstr, shdr[str_idx].sh_size); in e32_save_symtab()
417 elf->dynstr_size = shdr[str_idx].sh_size; in e32_save_symtab()
422 Elf64_Shdr *shdr = elf->shdr; in e64_save_symtab() local
423 size_t str_idx = shdr[tab_idx].sh_link; in e64_save_symtab()
425 elf->dynsymtab = (void *)(vaddr_t)(shdr[tab_idx].sh_addr + in e64_save_symtab()
432 shdr[tab_idx].sh_size); in e64_save_symtab()
434 if (shdr[tab_idx].sh_size % sizeof(Elf64_Sym)) in e64_save_symtab()
437 elf->num_dynsyms = shdr[tab_idx].sh_size / sizeof(Elf64_Sym); in e64_save_symtab()
442 elf->dynstr = (void *)(vaddr_t)(shdr[str_idx].sh_addr + elf->load_addr); in e64_save_symtab()
443 check_range(elf, ".dynstr/STRTAB", elf->dynstr, shdr[str_idx].sh_size); in e64_save_symtab()
445 elf->dynstr_size = shdr[str_idx].sh_size; in e64_save_symtab()
453 Elf32_Shdr *shdr = elf->shdr; in save_symtab() local
456 if (shdr[n].sh_type == SHT_DYNSYM) { in save_symtab()
462 Elf64_Shdr *shdr = elf->shdr; in save_symtab() local
465 if (shdr[n].sh_type == SHT_DYNSYM) { in save_symtab()
1103 elf->shdr = malloc(sz); in copy_section_headers()
1104 if (!elf->shdr) in copy_section_headers()
1115 memcpy(elf->shdr, (void *)(elf->load_addr + elf->e_shoff), in copy_section_headers()
1120 res = sys_copy_from_ta_bin((uint8_t *)elf->shdr + offs, in copy_section_headers()
1168 free(elf->shdr); in clean_elf_load_main()