3 ms·
Yes, it's not literally libc on windows, but the point is that directly calling syscalls is not supported, you have to call through the platform's library for d
by steveklabnik 1y ago
Yes, it's not literally libc on windows, but the point is that directly calling syscalls is not supported, you have to call through the platform's library for doing so.
On some systems, this is just not a supported configuration (like what you're talking about with Windows) and on some, they go further, and actually try and prevent you from doing so, even in assembly.)
- immibis 1y agoThere's still something on the platform that you can call without extra indirection in the way on your side of the handoff. That is true on all platforms; whether it's an INT or SYSCALL instruction or a CALL or JMP instruction is irrelevant.
- int_19h 1y agoIf it's a CALL instruction into a user-space DLL, that's still an extra indirection.
- immibis 1y agoKind of like the syscall dispatch table on the Linux kernel side, right? After you issue the handoff instruction and it becomes the operating system's problem, there's still more code before you get to the code that does the thing you wanted.