modutils and 2.4 kernel broken?

Robin Farine robin.farine at
Tue Dec 20 16:59:36 UTC 2005

On Tue December 20 2005 10:10, yan seiner wrote:
> Robin Farine wrote:

> >In general, header files from a specific kernel version should
> > be used only when building kernel modules for this kernel
> > version. To build user-space applications which must run with
> > many kernel versions, a special set of kernel headers such as
> > those the linux-kernel-headers Debian package provides should
> > be used.
> This seems to conflict with the docs for building glibc that I
> read over the weekend.... Not that I am an expert - it took me
> all weekend to get a working toolset - but ISTR the docs saying
> that you should use the most recent kernel headers you can; I
> used 2.6.14 and that seemed to work....

You are right. At least glibc 2.3.2 emulates some system calls using 
others when "asm/unistd.h" does not provide a __NR_... CPP symbol 
for a system call number, a typical example with Linux is 
'waitpid' (see "sysdeps/unix/sysv/linux/waitpid.c"). The initial 
problem motivating the removal of system call number definitions 
for non-implemented system calls from "asm-arm/unistd.h" was that 
waitpid() was failing with errno set to ENOSYS.

I thought that since the definition of __NR_query_module has been 
removed from "asm-arm/unistd.h" in 2.6 kernels, glibc would not 
provide a system call wrapper for it. But if you built everything 
with 2.6.14 headers and you can manipulate 2.4.x kernel modules, 
then something must have changed in glibc-2.3.5 or somewhere else. 
Anyway, I am curious to know how it actually works.


More information about the busybox mailing list