Subject: Re: -current amd64 kernel compilation failure with COMPAT_NETBSD32
To: Nicolas Joly <njoly@pasteur.fr>
From: Chuck Silvers <chuq@chuq.com>
List: port-amd64
Date: 10/06/2005 08:54:28
On Tue, Oct 04, 2005 at 04:01:50PM +0200, Nicolas Joly wrote:
> Wow! A simple `hello world' program does not work anymore ...
> 
> njoly@lanfeust [~]> file emul/netbsd32/hello 
> emul/netbsd32/hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for NetBSD 2.0D, dynamically linked (uses shared libs), not stripped
> njoly@lanfeust [~]> ./emul/netbsd32/hello 
> fstat: /etc/ld.so.conf: Cannot allocate memory
> zsh: segmentation fault (core dumped)  ./emul/netbsd32/hello
> njoly@lanfeust [~]> ktruss ./emul/netbsd32/hello
>    685 ktruss   emul(netbsd)
>    685 ktruss   fcntl(0x4, 0x3, 0)                 = 1
>    685 ktruss   fcntl(0x4, 0x4, 0x1)               = 0
>    685 hello    emul(netbsd32)
>    685 hello    netbsd32_execve("./emul/netbsd32/hello", 0x7f7fffffeb40, 0x7f7fffffeb50) JUSTRETURN
>    685 hello    netbsd32___sysctl(0xffffffffffffd92c, 0x2, 0xffffffff880532c0, 0xffffffffffffd928, 0, 0) = 0
>    685 hello    netbsd32_mmap(0, 0x8000, 0x3, 0x1002, 0xffffffffffffffff, 0, 0, 0) = 0x88055000
>    685 hello    geteuid()                          = 1000
>    685 hello    getuid()                           = 1000
>    685 hello    getegid()                          = 100
>    685 hello    getgid()                           = 100
>    685 hello    netbsd32_open("/emul/netbsd32/etc/ld.so.conf", 0, 0) = 3
>    685 hello    netbsd32___fstat13(0x3, 0xffffffffffffdaf0) = 0
>    685 hello    netbsd32_mmap(0, 0, 0x3, 0x2, 0x3, 0, 0, 0) = 0x88049000
>    685 hello    netbsd32_close(0x3)                = 0
>    685 hello    netbsd32_munmap(0xffffffff88049000, 0) = 0
>    685 hello    SIGSEGV SIG_DFL

hi,

I don't have that problem with recent netbsd-3 sources (from saturday).
could you send me a copy of your hello binary and 32-bit ld.elf_so?

-Chuck