First time user - basic question
Mon Mar 14 03:14:00 GMT 2011
On Sun, Mar 13, 2011 at 5:58 PM, Jim Norton <firstname.lastname@example.org> wrote:
> When I configured the tool-chain it requested to know what version of Linux.
> I responded with the version of the kernel that is running on my
> BeagleBoard-xM ( 2.6.32.xx ). But I'm curious.. why is this information
The interface between the kernel and user-space changes over time.
This is known as the kernel API. Probably one of the highest goals of
Linus himself is that this API changes as little as possible and in a
way that is most backwardly compatible as possible. Because of this
goal, programs written decades ago can still be run (and compiled) on
the most recent kernels. But the opposite isn't necessarily true,
something written recently might not work on an older kernel.
As a concrete example, a recent addition to the kernel API was Robert
Love's inotify interface. If you write an application today which
makes use of this new-ish API you'll need a kernel that at a minimum
supports this call. If you wanted to support older kernels then your
application would have to use the dnotify interface (which is what
inotify was meant to improve). Note, however, that even in the most
recent kernels dnotify is still available, the new thing is added, but
the old isn't removed just because it's old (this helps maintain
I'm not an expert on exactly how this all comes together, but
basically your compiler and C library need to know which kernel you're
using so they know where to find the relevant kernel headers so they
can use them when compiling so they are using the correct API to the
kernel you are targeting. This is tied into your C library; it's up to
your C library to properly interface your code to the kernel.
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc