Lines Matching refs:shdr
242 Elf_Shdr *shdr = &info->sechdrs[i];
244 if ((shdr->sh_flags & SHF_ALLOC)
245 && strcmp(info->secstrings + shdr->sh_name, name) == 0)
309 Elf_Shdr *shdr = &info->sechdrs[i];
310 if (strcmp(info->secstrings + shdr->sh_name, name) == 0)
1862 static int validate_section_offset(const struct load_info *info, Elf_Shdr *shdr)
1874 secend = shdr->sh_offset + shdr->sh_size;
1875 if (secend < shdr->sh_offset || secend > info->len)
1944 Elf_Shdr *shdr;
1985 shdr = &sechdrs[i];
1986 switch (shdr->sh_type) {
1992 err = validate_section_offset(info, shdr);
1995 i, shdr->sh_type);
2024 Elf_Shdr *strhdr, *shdr;
2062 shdr = &info->sechdrs[i];
2064 if (shdr->sh_type == SHT_NULL)
2066 if (shdr->sh_name >= strhdr->sh_size) {
2068 i, shdr->sh_type);
2136 Elf_Shdr *shdr;
2146 shdr = &info->sechdrs[mod_idx];
2148 if (shdr->sh_type == SHT_NOBITS) {
2154 if (!(shdr->sh_flags & SHF_ALLOC)) {
2160 if (shdr->sh_size != sizeof(struct module)) {
2550 Elf_Shdr *shdr = &info->sechdrs[i];
2556 shdr->sh_addr = (size_t)info->hdr + shdr->sh_offset;
2822 Elf_Shdr *shdr = &info->sechdrs[i];
2825 if (!(shdr->sh_flags & SHF_ALLOC))
2828 sname = info->secstrings + shdr->sh_name;
2833 if (codetag_needs_module_section(mod, sname, shdr->sh_size)) {
2834 dest = codetag_alloc_module_section(mod, sname, shdr->sh_size,
2835 arch_mod_section_prepend(mod, i), shdr->sh_addralign);
2846 enum mod_mem_type type = shdr->sh_entsize >> SH_ENTSIZE_TYPE_SHIFT;
2847 unsigned long offset = shdr->sh_entsize & SH_ENTSIZE_OFFSET_MASK;
2852 if (shdr->sh_type != SHT_NOBITS) {
2860 (WARN_ON_ONCE(shdr->sh_size != sizeof(struct module)))) {
2864 memcpy(dest, (void *)shdr->sh_addr, shdr->sh_size);
2872 shdr->sh_addr = (unsigned long)dest;
2873 pr_debug("\t0x%lx 0x%.8lx %s\n", (long)shdr->sh_addr,
2874 (long)shdr->sh_size, info->secstrings + shdr->sh_name);