NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: linux binary convert
2020-04-16 16:44 időpontban Martin Husemann ezt írta:
On Thu, Apr 16, 2020 at 04:37:23PM +0200, Fekete Zoltán wrote:
Hi There,
I have a 3rd party, closed-source binary .so file.
I can use it on NetBSD with the COMPAT_LINUX option and some
other linux
libraries along.
So, I guess there is no linux-specific system call inside (Am I
wrong?).
You are likely wrong - it could include its own specific syscalls,
or
otherwise reference the linux C library which contains the linux
specific
syscalls.
The binaries are recognized as linux binaries and the syscalls
interpreted
as such.
However I would like to link it to my own native NetBSD binary.
If it contains any syscalls itself, you can not do that.
A whole process is bound to a specific "emulation", which could be
native
NetBSD, or native NetBSD 32bit binaries, or Linux, or whatever.
If it doesn't do any syscalls, you still need a glibc compatible C
library
which would collide with the NetBSD native C library.
Easiest way out: compile your own code with a Linux toolchain, link
against
the closed source .so and run the result under linux emulation.
Martin
Thanks for the answer. You might give me advice how run the built binary
(linux) in a debugger. The linux gdb doesn't work as it can't see the
process, NetBSD debugger doesn't know the format.
Development on linux is solution , it'sobvious, but I just want go with
the experiment as far as possible.
Regards,
FeZ
Home |
Main Index |
Thread Index |
Old Index