Would a very small/simple command line program, programmed in standards compliant C99, and statically compiled on FreeBSD work if executed on Linux ?
(I would test this myself but I do not currently have a separate HDD to test on Linux.)
Would a very small/simple command line program, programmed in standards compliant C99, and statically compiled on FreeBSD work if executed on Linux ?
(I would test this myself but I do not currently have a separate HDD to test on Linux.)
Only if FreeBSD and Linux used the exact same syscalls, and did them in the exact same way. I haven't looked into the internals, but that seems unlikely.
No, not in general, because the syscall interface is different. However, FreeBSD has a good Linux compatibility layer where you can run Linux binaries (that are compiled against the Linux syscall interface) on FreeBSD. There is such a layer available for both i386 and amd64 binaries.
See Chapter 10: Linux Binary Compatibility of the FreeBSD handbook for more information.