--enable-kernel check too late in dynamic linker

Andreas Jaeger aj@suse.de
Tue Mar 7 05:28:00 GMT 2000


If I compile the current glibc 2.2 CVS version with
--enable-kernel=2.3.48 and try to run it on a Linux 2.2.14 system, I
get the following error:

$ elf/ld.so --library-path . /bin/ls
/bin/ls: error while loading shared libraries: /bin/ls: cannot stat shared object: Error 38

strace reveals that fstat64 is called:
open("/bin/ls", O_RDONLY)               = 3
SYS_197(0x3, 0xbffff0ec, 0x8, 0x8, 0x3) = -1 ENOSYS (Function not implemented)
close(3)                                = 0
write(2, "/bin/ls", 7/bin/ls)                  = 7

fstat64 seems to be called via the fstat call in
sysdeps/unix/sysv/linux/i386/fstat.c from the dynamic linker.

sysdeps/unix/sysv/linux/init-first.c has a check for the kernel
version and reports "too old kernel" - but this check happens too
late.  Is there any chance to move this earlier?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de


More information about the Libc-hacker mailing list