From owner-p4-projects@FreeBSD.ORG Thu May 8 14:32:35 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F59837B404; Thu, 8 May 2003 14:32:35 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C91437B401 for ; Thu, 8 May 2003 14:32:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9B3443FA3 for ; Thu, 8 May 2003 14:32:34 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h48LWY0U083770 for ; Thu, 8 May 2003 14:32:34 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h48LWY3G083767 for perforce@freebsd.org; Thu, 8 May 2003 14:32:34 -0700 (PDT) Date: Thu, 8 May 2003 14:32:34 -0700 (PDT) Message-Id: <200305082132.h48LWY3G083767@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 30815 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2003 21:32:36 -0000 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;