From mboxrd@z Thu Jan 1 00:00:00 1970 From: gknispel@proformatique.com (Guillaume Knispel) Date: Wed, 29 Jun 2011 22:05:45 +0200 Subject: link question In-Reply-To: <20110629184040.GA18539@kroah.com> References: <4E0B629E.6030302@tysdomain.com> <20110629184040.GA18539@kroah.com> Message-ID: <20110629220545.0fe37dfb@xilun> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, 29 Jun 2011 11:40:40 -0700 Greg KH wrote: > On Wed, Jun 29, 2011 at 11:36:30AM -0600, Littlefield, Tyler wrote: > > I have a quick question; this is something I haven't been able to figure > > out. By using the kernel headers you can call functions that are defined > > in the kernel, > > >From userspace? No you can't. You need to use glibc or something else. > > The kernel is not a library, the only way to interact with it from > userspace is by making system calls. You can use glibc or some libc to > make those system calls for you through other functions, or you can call > them "raw" if you really know what you are doing. > > Hope this helps, > > greg k-h Or maybe he was actually talking about kernel modules and in this case the linking is done by the kernel itself, at runtime. -- Guillaume Knispel