3 ms·
But still, Linux syscalls are different on each architecture.
by pdw 10y ago
But still, Linux syscalls are different on each architecture.
- justincormack 10y agoIndeed, stupidly different. Different syscall numbers, different argument orders, different values for constants, different struct layouts, ... Some architectures, like MIPS, are particularly bad, with nods to Irix compatibility thrown in. The BSDs are all exactly the same for every architecture, sane.
- qb45 10y agoDoes that mean you can run Irix binaries on MIPS Linux?
- drewg123 10y agoThis dates back to how Linus did the first non-x86 port of Linux to the DEC Alpha. Rather than copying the x86 linux syscall conventions, he used the DEC OSF/1 syscall conventions to ease bootstrapping. This is a perfectly sane approach. But he probably should have reverted to a native syscall numbering rather than leaving this bootstrapping hack in place.
- colin_mccabe 10y agoDifferent platforms have different sets of registers and alignment requirements. You want to pass things in registers if possible. If you want to avoid inefficiency, you need platform differences. And this is all hidden from users and even developers anyway.
- startling 10y ago...which is why he used the SYS_ #defines.