Date: Thu, 8 May 2003 14:32:34 -0700 (PDT) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 30815 for review Message-ID: <200305082132.h48LWY3G083767@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30815 Change 30815 by jmallett@jmallett_dalek on 2003/05/08 14:32:15 Skip the /red/herring PT_INTERP stuff for the kernel it won't matter (afaik), also skip PT_DYNAMIC (which may be wrong.) Affected files ... .. //depot/projects/mips/usr.bin/elf2ecoff/elf2ecoff.c#2 edit Differences ... ==== //depot/projects/mips/usr.bin/elf2ecoff/elf2ecoff.c#2 (text+ko) ==== @@ -253,23 +253,24 @@ /* XXX PT_MIPS_REGINFO.... maybe a machdep macro for doing * the check in question. */ - 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_DYNAMIC: + case PT_INTERP: if (debug) { fprintf(stderr, " skipping PH %d type %d flags 0x%x\n", i, ph[i].p_type, ph[i].p_flags); } continue; + case PT_LOAD: + break; + default: + fprintf(stderr, "Program header %d type %d can't be converted.\n", + i, ph[i].p_type); + exit(1); } - /* 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", - i, ph[i].p_type); - exit(1); - } /* Writable (data) segment? */ if (ph[i].p_flags & PF_W) { struct sect ndata, nbss;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305082132.h48LWY3G083767>