Hacker News new | ask | show | jobs
by andy_threos_io 1984 days ago
nope, every decent OS has system call library you can write like:

  bl _Open ; whatever syscall name you have
and the linker or the OS dynamic linker will get you the proper system call code, with the numbers.

BTW even in our small threos.io os we use dynamic linked system calls.

1 comments

I know how dynamic linkers work and am not arguing against using the libc interface in general. I'm saying that this program intentionally doesn't use those interfaces.
This can be a problem on macOS; Apple doesn't keep compatibility among releases at sysenter level.

Golang used to run into this, they switched to using libSystem in 1.11: https://golang.org/doc/go1.11#runtime

The system call library is NOT libc.
Then Apple doesn't have it.
/usr/lib/system/libsystem_kernel.dylib
you don't know about it

/usr/lib/system/libsystem_kernel.dylib

ex. https://stackoverflow.com/questions/37656016/osx-setgid-syst...

That's part of libSystem, macOS's libc implementation…