Lines Matching refs:shdr
163 elf_shdr_t *shdr = ext->sect_hdrs + i; in llext_find_tables() local
168 (size_t)shdr->sh_offset, in llext_find_tables()
169 shdr->sh_name, in llext_find_tables()
170 shdr->sh_type, in llext_find_tables()
171 (size_t)shdr->sh_flags, in llext_find_tables()
172 (size_t)shdr->sh_addr, in llext_find_tables()
173 (size_t)shdr->sh_addralign, in llext_find_tables()
174 (size_t)shdr->sh_size, in llext_find_tables()
175 shdr->sh_link, in llext_find_tables()
176 shdr->sh_info); in llext_find_tables()
178 if (shdr->sh_type == SHT_SYMTAB && ldr->hdr.e_type == ET_REL) { in llext_find_tables()
180 ldr->sects[LLEXT_MEM_SYMTAB] = *shdr; in llext_find_tables()
182 strtab_ndx = shdr->sh_link; in llext_find_tables()
184 } else if (shdr->sh_type == SHT_DYNSYM && ldr->hdr.e_type == ET_DYN) { in llext_find_tables()
186 ldr->sects[LLEXT_MEM_SYMTAB] = *shdr; in llext_find_tables()
188 strtab_ndx = shdr->sh_link; in llext_find_tables()
190 } else if (shdr->sh_type == SHT_STRTAB && i == shstrtab_ndx) { in llext_find_tables()
192 ldr->sects[LLEXT_MEM_SHSTRTAB] = *shdr; in llext_find_tables()
195 } else if (shdr->sh_type == SHT_STRTAB && i == strtab_ndx) { in llext_find_tables()
197 ldr->sects[LLEXT_MEM_STRTAB] = *shdr; in llext_find_tables()
237 elf_shdr_t *shdr = ext->sect_hdrs + i; in llext_map_sections() local
239 name = llext_section_name(ldr, ext, shdr); in llext_map_sections()
250 switch (shdr->sh_type) { in llext_map_sections()
255 if (shdr->sh_flags & SHF_EXECINSTR) { in llext_map_sections()
257 } else if (shdr->sh_flags & SHF_WRITE) { in llext_map_sections()
283 !(shdr->sh_flags & SHF_ALLOC) || in llext_map_sections()
284 shdr->sh_size == 0) { in llext_map_sections()
293 if (shdr->sh_entsize != sizeof(void *) || in llext_map_sections()
294 shdr->sh_size % shdr->sh_entsize != 0) { in llext_map_sections()
314 if (ldr_parm->section_detached && ldr_parm->section_detached(shdr)) { in llext_map_sections()
322 memcpy(region, shdr, sizeof(*region)); in llext_map_sections()
327 if ((shdr->sh_flags & SHF_BASIC_TYPE_MASK) != in llext_map_sections()
330 (uint32_t)shdr->sh_flags, (uint32_t)region->sh_flags, in llext_map_sections()
363 if (shdr->sh_addr - region->sh_addr != in llext_map_sections()
364 shdr->sh_offset - region->sh_offset) { in llext_map_sections()
375 size_t address = MIN(region->sh_addr, shdr->sh_addr); in llext_map_sections()
376 size_t bot_ofs = MIN(region->sh_offset, shdr->sh_offset); in llext_map_sections()
378 shdr->sh_offset + shdr->sh_size); in llext_map_sections()
379 size_t addralign = MAX(region->sh_addralign, shdr->sh_addralign); in llext_map_sections()
499 elf_shdr_t *shdr = ext->sect_hdrs + i; in llext_map_sections() local
503 ldr->sect_map[i].offset = shdr->sh_offset - ldr->sects[mem_idx].sh_offset; in llext_map_sections()
671 elf_shdr_t *shdr = ext->sect_hdrs + shndx; in llext_copy_symbols() local
672 uintptr_t section_addr = shdr->sh_addr; in llext_copy_symbols()
675 (!ldr_parm->section_detached || !ldr_parm->section_detached(shdr))) { in llext_copy_symbols()
687 base = llext_peek(ldr, shdr->sh_offset); in llext_copy_symbols()