[reposted from lfs-dev by request]

I've built GCC4-20050721 up through chapter 6 "readjusting toolchain".
When, as recommended, I compile dummy.c and running readelf -l on it,
everything appears normal, but the executable is in fact un-runnable:

[lfs chroot src]# ./a.out
bash: ./a.out: No such file or directory
[lfs chroot src]# ldd a.out
/usr/bin/ldd: line 124: ./a.out: No such file or directory
[lfs chroot src]# /lib/ld-2.3.5.so a.out
a.out: error while loading shared libraries: a.out: cannot open shared
 object file: No such file or directory
[lfs chroot src]# readelf -l a.out

Elf file type is EXEC (Executable file)
Entry point 0x80482b0
There are 7 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
  INTERP         0x000114 0x08048114 0x08048114 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /lib/ld-linux-so.2]
  LOAD           0x000000 0x08048000 0x08048000 0x004bc 0x004bc R E 0x1000
  LOAD           0x0004bc 0x080494bc 0x080494bc 0x00100 0x00104 RW  0x1000
  DYNAMIC        0x0004d0 0x080494d0 0x080494d0 0x000c8 0x000c8 RW  0x4
  NOTE           0x000128 0x08048128 0x08048128 0x00020 0x00020 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

 Section to Segment mapping:
  Segment Sections...
   00
   01     .interp
   02     .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version
          .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata
          .eh_frame
   03     .ctors .dtors .jcr .dynamic .got .got.plt .data .bss
   04     .dynamic
   05     .note.ABI-tag
   06


I've been unable to track down what's wrong.  The host system is
Debian-testing.  For what it's worth:

[lfs chroot src]# uname -a
Linux lear35 2.6.12.3 #1 Wed Jul 20 15:44:59 PDT 2005 i686 unknown
 unknown GNU/Linux
[lfs chroot src]# /lib/libc-2.3.5.so
GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.0.1.
Compiled on a Linux 2.6.12 system on 2005-07-21.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.


There were some probably unrelated errors in the glibc testsuite:

[lfs chroot src]# grep Error glibc-ch6-checklog
make[3]: *** [/usr/src/glibc-build/math/test-float.out] Error 1
make[3]: *** [/usr/src/glibc-build/math/test-double.out] Error 1
make[3]: *** [/usr/src/glibc-build/math/test-ifloat.out] Error 1
make[3]: *** [/usr/src/glibc-build/math/test-idouble.out] Error 1
make[2]: *** [math/tests] Error 2
make[3]: [/usr/src/glibc-build/posix/annexc.out] Error 1 (ignored)
make[1]: *** [check] Error 2

-- 
"Life's not fair, but the root password helps." -- BOFH
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to