> If you take a close look, you'll find more variations between Linux ABIs > for different CPUs than between all BSD implementations: common syscalls > of all BSD flavors do the same thing (and have the same ABI whatever the > CPU...). You'll also find very few variations between the syscalls > common to BSD & Linux because most of those directly map POSIX defined > functions. > Then, following the given argument, we never should try to share any > code between linux-user for different targets, as the Linux ABI and > behavior is different for different CPUs...
I'd guess that the ones that are all the same are the ones that don't take any real effort to implement in the first place. If you can combine the implementations I'd also expect to be able to do cross emulation. e.g. run *BSD applications on a Linux host. This definitely works for simple cases, even in the extreme case of a windows host - as you say many syscalls map directly onto POSIX functions so there is only ever one implementation. Whether it works well enough for real applications or whole distributions of software I'm not so sure. If you can't do cross emulation I'm sceptical about how much they can be combined. Paul