NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Linux binary works without being under /emul/linux



Mayuresh <mayuresh%acm.org@localhost> writes:

> Now I find that I am able to launch the main binary without keeping it
> under /emul/linux.
>
> Is that how it is supposed to be?

Yes.   The actual emulation of Linux binaries is based on the ELF type
and it doesn't matter where they are.

The rationale for the existence of /emul/linux (and /emul/foo in
general) is that programs have shared libraries.  Those need to be
searched for in a GNU/Linux system with shlibs laid out the way the
binary expects, and that's what it is in /emul/linux.

> ldd says:
>
>     -lstdc++.6 => not found
>     -lgcc_s.1 => /usr/lib/libgcc_s.so.1
>     -lc.6 => not found

Expected, and 2nd line is mis-finding a NetBSD lib of the same name/version.

> /emul/linux/usr/bin/ldd says:
>
>     ldd: exited with unknown exit code (139)

Not expected.  On my system:

$ /emul/linux/usr/bin/ldd /emul/linux/usr/bin/who
        libc.so.6 => /lib64/libc.so.6 (0x00007f7ff7852000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7ff7c00000)

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index