Subject: Re: COMPAT_FREEBSD problem
To: None <netbsd-help@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-help
Date: 11/19/2002 18:57:42
In article <20021119184437.GA258@glen.takilma.net>,
 <collver1@attbi.com> wrote:
>Christos,
>
>Thank you so much for your help.
>
>I put debugging printfs in freebsd_exec_elf32.c
>
>In ELFNAME2(freebsd,probe) near the top, there is a test:
>	eh->e_ident[EI_OSABI] != ELFOSABI_FREEBSD
>
>eh->e_ident[EI_OSABI] == 0, and so it fails this test.
>


We are getting there; try changing:

        if ((eh->e_ident[EI_BRAND] == '\0'
		|| strcmp(&eh->e_ident[EI_BRAND], wantBrand) != 0)
	    && eh->e_ident[EI_OSABI] != ELFOSABI_FREEBSD)
		return ENOEXEC;

to:

        if ((eh->e_ident[EI_BRAND] == '\0'
		|| strcmp(&eh->e_ident[EI_BRAND], wantBrand) != 0)
	    && (eh->e_ident[EI_OSABI] != ELFOSABI_FREEBSD &&
		eh->e_ident[EI_OSABI] != 0))
		return ENOEXEC;

christos