[arch-general] linux-api-headers in core is 3.1.5 while linux is 3.1.6

C Anthony Risinger anthony at xtfx.me
Sat Jan 7 00:40:19 EST 2012


On Jan 6, 2012 9:52 PM, "Patrick Buddeberg" <perchy22
<perchy22 at gmail.com>@<perchy22 at gmail.com>
gmail.com <perchy22 at gmail.com>> wrote:
>
> Honestly, even a "Let Me Google that For You" link would be useful to
> my mental blocked self right now.

http:// <http://lmgtfy.com/?q=sanitized+kernel+headers+stable+libc+abi>
lmgtfy.com <http://lmgtfy.com/?q=sanitized+kernel+headers+stable+libc+abi>
/?q=sanitized+kernel+headers+stable+<http://lmgtfy.com/?q=sanitized+kernel+headers+stable+libc+abi>
libc <http://lmgtfy.com/?q=sanitized+kernel+headers+stable+libc+abi>+<http://lmgtfy.com/?q=sanitized+kernel+headers+stable+libc+abi>
abi <http://lmgtfy.com/?q=sanitized+kernel+headers+stable+libc+abi>

;-)

http:// <http://lkml.indiana.edu/hypermail/linux/kernel/0007.3/0587.html>
lkml.indiana.edu<http://lkml.indiana.edu/hypermail/linux/kernel/0007.3/0587.html>
/ <http://lkml.indiana.edu/hypermail/linux/kernel/0007.3/0587.html>hypermail<http://lkml.indiana.edu/hypermail/linux/kernel/0007.3/0587.html>
/linux/kernel/0007.3/0587.<http://lkml.indiana.edu/hypermail/linux/kernel/0007.3/0587.html>
html <http://lkml.indiana.edu/hypermail/linux/kernel/0007.3/0587.html>

[ http:// <http://lwn.net/Articles/434318/>lwn.net<http://lwn.net/Articles/434318/>
/Articles/434318/ <http://lwn.net/Articles/434318/> ]

"The most common way to invoke the kernel is by using GNU libc (glibc).
Glibc has a set of "sanitized" kernel header files that are used to build
the library, and distributions typically provide packages with those header
files to be installed into /usr/include.  Programs can then be built by
using those header files and linking to glibc. While "sanitized" may sound
like it refers to the removal of GPL-covered elements from those files, the
main reason it is done is to remove kernel-specific elements from the
files. The kernel headers have lots of kernel-internal types, constants,
and functions that are not part of the kernel interface.

It isn't really correct to call the interface that the kernel provides to
user space an API (i.e. application programming interface), as it is really
an application binary interface (ABI), and one that the kernel hackers
strive to maintain for each new kernel release. Removing something from the
kernel ABI almost never happens, though new features expand that ABI
frequently. The ABI is what allows binaries that were built on an earlier
kernel to run on newer kernels. The API, on the other hand, is provided by
glibc or some other library."

(kernel can generate its own sanitized headers since 2.6.18)

... so in my understanding, glibc can take advantage of new kernel features
simply by being rebuilt -- when you invoke syscalls/etc from userspace, you
call them THRU the libc library -- libc can do whatever behind the scenes
to make use of additional features other user space programs are unaware
of, so long as the expected return types match.  Without this, binaries
would break all the time because the perceived API would be in constant
flux, even though the ABI is back-compat ... all of user space looks to
glibc to access kernel, so the API files update when glib updates, and do
not correlate with the actual kernel in-use (please anyone expand/correct
as needed ... my knowledge is only ~30 min old)

C Anthony [mobile]


More information about the arch-general mailing list