Lines Matching defs:shdr
97 Elf32_Shdr shdr[MAX_SECTIONS];
152 shdr[idx].sh_flags = SHF_ALLOC | SHF_EXECINSTR;
157 shdr[idx].sh_flags = SHF_ALLOC;
162 shdr[idx].sh_flags = SHF_ALLOC | SHF_WRITE;
167 shdr[idx].sh_flags = SHF_ALLOC | SHF_WRITE;
183 shdr[idx].sh_type = (idx == BSS_SECTION) ? SHT_NOBITS : SHT_PROGBITS;
184 shdr[idx].sh_size = pe_shdr->raw_data_size;
185 shdr[idx].sh_addralign = 1 << (((pe_shdr->characteristics >>
191 shdr[idx].sh_offset = offset;
207 shdr[num_sections].sh_name = insert_string (relname);
208 shdr[num_sections].sh_link = i;
209 shdr[num_sections].sh_info = idx;
211 shdr[idx].sh_name = shdr[num_sections].sh_name + 4;
216 shdr[idx].sh_name = insert_string (name);
238 pe_sec = pe_shdr + shdr[i].sh_link;
275 != shdr[i].sh_info)
295 shdr[shdr[i].sh_info].sh_size,
296 shdr[shdr[i].sh_info].sh_offset,
299 shdr[i].sh_type = SHT_REL;
300 shdr[i].sh_offset = offset;
301 shdr[i].sh_link = SYMTAB_SECTION;
302 shdr[i].sh_addralign = 4;
303 shdr[i].sh_entsize = sizeof (Elf32_Rel);
304 shdr[i].sh_size = num_rels * sizeof (Elf32_Rel);
306 grub_util_write_image_at (rel, shdr[i].sh_size, offset, fp);
307 offset += shdr[i].sh_size;
361 symtab[num_syms].st_name = shdr[section_map[pe_symtab->section]].sh_name;
395 shdr[SYMTAB_SECTION].sh_name = insert_string (".symtab");
396 shdr[SYMTAB_SECTION].sh_type = SHT_SYMTAB;
397 shdr[SYMTAB_SECTION].sh_offset = offset;
398 shdr[SYMTAB_SECTION].sh_size = num_syms * sizeof (Elf32_Sym);
399 shdr[SYMTAB_SECTION].sh_entsize = sizeof (Elf32_Sym);
400 shdr[SYMTAB_SECTION].sh_link = STRTAB_SECTION;
401 shdr[SYMTAB_SECTION].sh_addralign = 4;
403 grub_util_write_image_at (symtab, shdr[SYMTAB_SECTION].sh_size,
405 offset += shdr[SYMTAB_SECTION].sh_size;
414 shdr[STRTAB_SECTION].sh_name = insert_string (".strtab");
415 shdr[STRTAB_SECTION].sh_type = SHT_STRTAB;
416 shdr[STRTAB_SECTION].sh_offset = offset;
417 shdr[STRTAB_SECTION].sh_size = strtab_len;
418 shdr[STRTAB_SECTION].sh_addralign = 1;
446 grub_util_write_image_at (&shdr, sizeof (Elf32_Shdr) * num_sections,