Lines Matching defs:shdr

25 	Elf_Shdr       shdr;
108 name = sec_strtab + secs[shndx].shdr.sh_name;
194 if (fread(&sec->shdr, sizeof(Elf_Shdr), 1, fp) != 1)
198 if (sec->shdr.sh_link < ehdr.e_shnum)
199 sec->link = &secs[sec->shdr.sh_link];
210 if (sec->shdr.sh_type != SHT_STRTAB)
213 sec->strtab = malloc(sec->shdr.sh_size);
216 sec->shdr.sh_size);
218 if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0)
220 sec->shdr.sh_offset, strerror(errno));
222 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) !=
223 sec->shdr.sh_size)
234 if (sec->shdr.sh_type != SHT_SYMTAB)
237 sec->symtab = malloc(sec->shdr.sh_size);
240 sec->shdr.sh_size);
242 if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0)
244 sec->shdr.sh_offset, strerror(errno));
246 if (fread(sec->symtab, 1, sec->shdr.sh_size, fp) !=
247 sec->shdr.sh_size)
263 base = sec->shdr.sh_addr;
269 if (sec->shdr.sh_type != SHT_REL_TYPE)
272 sec->reltab = malloc(sec->shdr.sh_size);
275 sec->shdr.sh_size);
277 if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0)
279 sec->shdr.sh_offset, strerror(errno));
281 if (fread(sec->reltab, 1, sec->shdr.sh_size, fp) !=
282 sec->shdr.sh_size)
285 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
297 Elf_Shdr shdr;
302 if (sec->shdr.sh_type != SHT_REL_TYPE)
309 if (fread(&shdr, sizeof(shdr), 1, fp) != 1)
317 shdr.sh_size = 0;
323 if (fwrite(&shdr, sizeof(shdr), 1, fp) != 1)
367 if (sec->shdr.sh_type != SHT_REL_TYPE)
371 sec_applies = &secs[sec->shdr.sh_info];
372 if (!(sec_applies->shdr.sh_flags & SHF_ALLOC))
377 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) {
471 size_reserved = sec_reloc->shdr.sh_size;
494 if (fseek(outf, sec_reloc->shdr.sh_offset, SEEK_SET) < 0) {
496 sec_reloc->shdr.sh_offset, strerror(errno));
527 sec_name(sec->shdr.sh_info),