In what library on Linux are the system calls and how is this library linked to the executable object file that contains the system calls?

前端 未结 3 1418
鱼传尺愫
鱼传尺愫 2021-01-06 16:14

I know that the system calls are not in the C standard Library. Is there any library (some sort of a system library) where the system calls are?

If there is such a l

3条回答
  •  鱼传尺愫
    2021-01-06 16:48

    The library is the standard C library (libc). This is normally glibc but some embedded linuxes will use musl and Android uses bionic.

    Linux as a platform is fairly unique in that the kernel/user interface is rather stable so different c libraries can be used.

    libc library will be linked in automatically as a shared library by your toolchain unless you tell it not to.

提交回复
热议问题