Is there any linux API / ABI source documentation

There are man (2) pages for system calls, but they describe the behavior of the C library (glibc), which sits on top of system calls. Is the original API / ABI system call documented somewhere (other than UseTheSourceLuke)? I saw some mention of the differences between the / libc kernel in the man pages, but I had no idea that the primary task is to document these differences.

What I really want to say is: is the C library considered the default / documented Linux API by default, and the kernel API / ABI system call is considered unstable (can change) and therefore undocumented for purpose or low priority?

So, kernel developers who change the system call create workarounds in glibc? What about another libc?

Can I find historical discussions on this?

Edit: Thus, ABI is stable as well as the behavior of system calls, but they are not documented by the kernel developers. Glibc documents them (with its own additions / changes). Right?

+6
source share
3 answers

I don't think kernel developers actually publish interrupt APIs, but you can find third-party diagrams like this one .

+3
source

The answer to your question is on the syscall man page. In particular, pay attention to the title of the section "Architecture Calling Conventions" and note, as John Bollinger mentioned above, that this information may vary depending on the kernel versions.

+2
source

What I really want to say is: is the C library considered the default / documented Linux API by default, and the kernel API / ABI system call is considered unstable (can change) and therefore undocumented for purpose or low priority?

It is impossible to speak with politics without specifying politics for what.

Programming people for "Linux" is usually usually programmed for one or more variants of GNU / Linux, and not for the bare kernel. Therefore, I am inclined to say that we probably do not consider the policy of kernel developers. In fact, if the C library interface is accessible at all, we are not talking about a bare core. Moreover, based on your tags, I assume that you are asking about programming in C. If you were programming in an assembly, then the raw syscall interface would be natural and appropriate, and most of my other comments are not applicable.

If you really aim GNU / Linux to exclude everything else, then the question is somewhat reasonable. On the other hand, it often happens that you prefer programming for wider compatibility. In this case, there is no alternative to using the CI library's SSI interface, because each system call is different. The glibc syscall interfaces do a pretty good job of compatibility with POSIX and SUS, so using them (correctly) is a huge advantage for portability. Even if other Unix and Unix-like systems, such as OS X, BSD, Solaris, etc., are not immediate targets, the ability to use your software on such systems is rarely lost.

In any case, if you were to have your software make direct calls to Linux directly, would you really insert the built-in assembly to do it wherever you wanted to? Surely not - you could write wrapper functions. Why should you mind using the carefully tested and well-documented wrapper functions already provided by the C library?

Of course, the syscall Linux interface changes to some degree between kernel versions. This can be considered what makes the versions different (I mean x.2yx.2z or xyzw ). I'm not quite tuned to how big such changes are, as a rule, but there have been incompatible changes in the past, and using the C library interfaces isolates you from such changes to some extent. However, as described above, I think there are other, larger reasons for preferring the C library interface.

0
source

All Articles