Loading arch/mips/boot/elf2ecoff.c +33 −27 Original line number Diff line number Diff line Loading @@ -349,17 +349,14 @@ int main(int argc, char *argv[]) for (i = 0; i < ex.e_phnum; i++) { /* Section types we can ignore... */ if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE || ph[i].p_type == PT_PHDR || ph[i].p_type == PT_MIPS_REGINFO) switch (ph[i].p_type) { case PT_NULL: case PT_NOTE: case PT_PHDR: case PT_MIPS_REGINFO: continue; /* Section types we can't handle... */ else if (ph[i].p_type != PT_LOAD) { fprintf(stderr, "Program header %d type %d can't be converted.\n", ex.e_phnum, ph[i].p_type); exit(1); } case PT_LOAD: /* Writable (data) segment? */ if (ph[i].p_flags & PF_W) { struct sect ndata, nbss; Loading @@ -382,6 +379,15 @@ int main(int argc, char *argv[]) /* Remember the lowest segment start address. */ if (ph[i].p_vaddr < cur_vma) cur_vma = ph[i].p_vaddr; break; default: /* Section types we can't handle... */ fprintf(stderr, "Program header %d type %d can't be converted.\n", ex.e_phnum, ph[i].p_type); exit(1); } } /* Sections must be in order to be converted... */ Loading Loading
arch/mips/boot/elf2ecoff.c +33 −27 Original line number Diff line number Diff line Loading @@ -349,17 +349,14 @@ int main(int argc, char *argv[]) for (i = 0; i < ex.e_phnum; i++) { /* Section types we can ignore... */ if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE || ph[i].p_type == PT_PHDR || ph[i].p_type == PT_MIPS_REGINFO) switch (ph[i].p_type) { case PT_NULL: case PT_NOTE: case PT_PHDR: case PT_MIPS_REGINFO: continue; /* Section types we can't handle... */ else if (ph[i].p_type != PT_LOAD) { fprintf(stderr, "Program header %d type %d can't be converted.\n", ex.e_phnum, ph[i].p_type); exit(1); } case PT_LOAD: /* Writable (data) segment? */ if (ph[i].p_flags & PF_W) { struct sect ndata, nbss; Loading @@ -382,6 +379,15 @@ int main(int argc, char *argv[]) /* Remember the lowest segment start address. */ if (ph[i].p_vaddr < cur_vma) cur_vma = ph[i].p_vaddr; break; default: /* Section types we can't handle... */ fprintf(stderr, "Program header %d type %d can't be converted.\n", ex.e_phnum, ph[i].p_type); exit(1); } } /* Sections must be in order to be converted... */ Loading