3 ms·
Good question. Given the well documented and stable x86/x86_64 Linux ABIs, it should be at least as feasible as the Darling project. I've been watching projects
by jevinskie 10y ago
Good question. Given the well documented and stable x86/x86_64 Linux ABIs, it should be at least as feasible as the Darling project. I've been watching projects like Darling and libhybris (run Android bionic libc binaries on glibc) but I haven't seen any project for running Linux ELFs on macOS specifically.
Projects like usercorn are already emulating lots of Linux syscalls on non-Linux hosts. Things are even easier if you can ignore the binary emulation and just focus on melding the two different ABIs and APIs.
I used usercorn to try and debug an Android shared lib on macOS. I got some of the SO to correctly execute (full dynamic linking wasn't working) but it did require light patching of usercorn. I would have had less issues if I was emulating a Android guest on Linux host (instead of macOS host) since you're syscall mappings are almost 1:1 then.
https://github.com/lunixbochs/usercorn https://github.com/lunixbochs/usercorn