Lines Matching defs:hdr
77 Elf32_External_Ehdr hdr, khdr;
138 open_file(const char *ftype, char *file, Elf32_External_Ehdr *hdr,
147 if (read(fd, hdr, sizeof(Elf32_External_Ehdr)) !=
151 if (hdr->e_ident[EI_MAG0] != ELFMAG0 ||
152 hdr->e_ident[EI_MAG1] != ELFMAG1 ||
153 hdr->e_ident[EI_MAG2] != ELFMAG2 ||
154 hdr->e_ident[EI_MAG3] != ELFMAG3 ||
155 hdr->e_ident[EI_CLASS] != ELFCLASS32)
158 if (hdr->e_ident[EI_DATA] != ELFDATA2MSB)
161 if (ELFGET16(hdr->e_machine) != EM_PPC)
180 length = sa_htole32(elf_stat.st_size - sizeof(hdr) + 0x400);
221 length = sa_htole32(elf_stat.st_size - sizeof(hdr) + 0x400);
237 length = sa_htole32(elf_stat.st_size - sizeof(hdr) + 0x400);
299 elf_fd = open_file("bootloader", boot, &hdr, &elf_stat);
306 for (i = 0; i < ELFGET16(hdr.e_phnum); i++) {
307 lseek(elf_fd, ELFGET32(hdr.e_phoff) + sizeof(phdr) * i,
467 elf_fd = open_file("bootloader", boot, &hdr, &elf_stat);
471 for (i = 0; i < ELFGET16(hdr.e_phnum); i++) {
472 lseek(elf_fd, ELFGET32(hdr.e_phoff) + sizeof(phdr) * i,
695 elf_fd = open_file("bootloader", boot, &hdr, &elf_stat);
702 for (i = 0; i < ELFGET16(hdr.e_phnum); i++) {
703 lseek(elf_fd, ELFGET32(hdr.e_phoff) + sizeof(phdr) * i,