Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a libc in kernel space?

Is there a libc in kernel space? I mean you have to build kernel against some libc right? So Is there a libc (probably statically-linked) sitting within kernel space?

If yes, how is this related to userland glibc? Must they be the same version?

like image 516
Ohcet Efil Avatar asked Jun 10 '26 08:06

Ohcet Efil


1 Answers

There is actually no libc in kernel space. Libc is user-space library, and you can't use it from kernel-space.

But almost all functions from libc that make sense in kernel space are ported. You can find headers in include/linux/ usually.

As far as I know these two implementations don't share codebase.

like image 51
Artem Abramov Avatar answered Jun 15 '26 22:06

Artem Abramov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!