Lines Matching refs:shdr

181 		Elf_Shdr *shdr = &info->sechdrs[i];  in find_sec()  local
183 if ((shdr->sh_flags & SHF_ALLOC) in find_sec()
184 && strcmp(info->secstrings + shdr->sh_name, name) == 0) in find_sec()
216 Elf_Shdr *shdr = &info->sechdrs[i]; in find_any_sec() local
217 if (strcmp(info->secstrings + shdr->sh_name, name) == 0) in find_any_sec()
1625 static int validate_section_offset(struct load_info *info, Elf_Shdr *shdr) in validate_section_offset() argument
1637 secend = shdr->sh_offset + shdr->sh_size; in validate_section_offset()
1638 if (secend < shdr->sh_offset || secend > info->len) in validate_section_offset()
1653 Elf_Shdr *shdr, *strhdr; in elf_validity_check() local
1745 shdr = &info->sechdrs[i]; in elf_validity_check()
1746 switch (shdr->sh_type) { in elf_validity_check()
1751 if (shdr->sh_link == SHN_UNDEF in elf_validity_check()
1752 || shdr->sh_link >= info->hdr->e_shnum) { in elf_validity_check()
1754 shdr->sh_link, shdr->sh_link, in elf_validity_check()
1760 err = validate_section_offset(info, shdr); in elf_validity_check()
1763 i, shdr->sh_type); in elf_validity_check()
1767 if (shdr->sh_flags & SHF_ALLOC) { in elf_validity_check()
1768 if (shdr->sh_name >= strhdr->sh_size) { in elf_validity_check()
1770 i, shdr->sh_type); in elf_validity_check()
1877 Elf_Shdr *shdr = &info->sechdrs[i]; in rewrite_section_headers() local
1883 shdr->sh_addr = (size_t)info->hdr + shdr->sh_offset; in rewrite_section_headers()
2179 Elf_Shdr *shdr = &info->sechdrs[i]; in move_module() local
2181 if (!(shdr->sh_flags & SHF_ALLOC)) in move_module()
2184 if (shdr->sh_entsize & INIT_OFFSET_MASK) in move_module()
2186 + (shdr->sh_entsize & ~INIT_OFFSET_MASK); in move_module()
2187 else if (!(shdr->sh_flags & SHF_EXECINSTR)) in move_module()
2188 dest = mod->data_layout.base + shdr->sh_entsize; in move_module()
2190 dest = mod->core_layout.base + shdr->sh_entsize; in move_module()
2192 if (shdr->sh_type != SHT_NOBITS) in move_module()
2193 memcpy(dest, (void *)shdr->sh_addr, shdr->sh_size); in move_module()
2195 shdr->sh_addr = (unsigned long)dest; in move_module()
2197 (long)shdr->sh_addr, info->secstrings + shdr->sh_name); in move_module()