PERFORCE change 30815 for review
    Juli Mallett 
    jmallett at FreeBSD.org
       
    Thu May  8 14:32:36 PDT 2003
    
    
  
http://perforce.freebsd.org/chv.cgi?CH=30815
Change 30815 by jmallett at 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;
    
    
More information about the p4-projects
mailing list