1.3.2: ELF loader problem

1.3.2: ELF loader problem

Post by Thomas Quin » Mon, 19 Jun 1995 04:00:00

The new 1.3.2 fails to load my ELF init binary. ld-linux.so fails with a
"dl_boot: open /dev/zero failed!".

1.3.1 worked fine here as far as ELF binaries are concerned.

Setup :
  ELF-hosted GCC compilers
  a.out-target for kernel compile, ELF otherwise.
  versions : ld.so 1.7.3 compiled with GCC 2.6.3
             SysVinit-2.5, ""      ""   "   " "
             kernel 1.3.2 compiled with 2.6.3, then 2.7.0 (same result).

No problem whatsoever with 1.2.10 kernel compiled with gcc 2.6.3.

Clues anyone ? (If possible, please email and I will summarize.)



1. elf loader and differing inode mappings..

        first off I'm running a stock 2.4.19 and have the RH8.0 glibc and
linker and toolchain..

I have modified my kernel to do some CRC'ing of text segments and it seems
to be working fine.. except when I load a program which hasn't been
stripped and I can't understand this..

I've locked all pages in memory by setting def_flags to VM_LOCKED in
fork.c, and I'm using the inode of the file (gotten from do_mmap_pgoff) to
give me the physical pages of where the file is actually mapped,
(i_mapping->clean_pages), and CRCing the pages mapped with
PROT_READ|PROT_EXEC. This was fine until I realised kernel loaded objects
(executable, dynamic linker) don't work quite so well with this due to
relocations and things.. so I then put some hooks in to load_elf_binary
and load_elf_interpreter along with some ELF header reading code to store
the start and end of the text segment within the inode,

This works for all cases except where the executable has not been
stripped, for some reason the clean_pages list changes between the kernel
loading the binary and my CRC thread coming along later and checking it ..
but *only* for unstripped binaries.. which as far as I can see should make
no difference whatsoever...

Any ideas?

David Airlie, Software Engineer

pam_smb / Linux DecStation / Linux VAX / ILUG person

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Modem for PPP connection

3. iBCS / Kernel ELF loader out to lunch???

4. What's chrctcp ?

5. execve & elf loader errors

6. ``Sort'' Problem

7. ELF Format kernel loader

8. Problems installing X-server in SuSE6.2

9. Name of the ELF dynamic loader

10. tracing ELF dynamical loader ??

11. ELF upgrade problems -- ncurses, gdbm, elf kernel

12. boot loader not showing up; installed boot loader record on /dev/hda2

13. Help with restoring /boot/loader.rc & loader.conf files please