[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problem with dynamic linker from libc6_2.6.1-1_powerpc.deb




Hi!

I have a problem with dynamic linker from libc6_2.6.1-1_powerpc.deb
package. I use this package on a powerpc target system, but all
dynamically linked programs stopped working, when I moved from
toolchain containing gcc 3.4.4 and glibc 2.3.6 to new
toolchain made up from gcc 4.2.2 and glibc 2.6.1.

Even a simple "hello world" program claims, that it will not find
libc.so.6:

./hello: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

All statically linked programs work. The same libraries are used
in my gcc&glibc toolchain so the libraries itself must be OK.

Strace output refers that libc.so.6 is opened and then closed
immediately as if it was not the right one...

Can someone give me any hints what might be wrong. If the information
is not sufficient then I can provide more.

readelf -d hello produces:
powerpc-linux-readelf -d hello

Dynamic section at offset 0x8a4 contains 21 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000c (INIT)                       0x1000029c
 0x0000000d (FINI)                       0x100007f0
 0x00000004 (HASH)                       0x10000164
 0x00000005 (STRTAB)                     0x100001dc
 0x00000006 (SYMTAB)                     0x1000018c
 0x0000000a (STRSZ)                      86 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x10010984
 0x00000002 (PLTRELSZ)                   36 (bytes)
 0x00000014 (PLTREL)                     RELA
 0x00000017 (JMPREL)                     0x10000278
 0x70000000 (PPC_GOT)                    0x10010978
 0x00000007 (RELA)                       0x1000026c
 0x00000008 (RELASZ)                     48 (bytes)
 0x00000009 (RELAENT)                    12 (bytes)
 0x6ffffffe (VERNEED)                    0x1000023c
 0x6fffffff (VERNEEDNUM)                 1
 0x6ffffff0 (VERSYM)                     0x10000232
 0x00000000 (NULL)                       0x0


I used strace with "hello" program and the result is following:
execve("./hello", ["./hello"], [/* 11 vars */]) = 0
brk(0)                                  = 0x10011000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3001f000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/tls/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/lib/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\346"..., 512) = 512
close(3)                                = 0
stat64("/lib", {st_mode=S_IFDIR|0777, st_size=2048, ...}) = 0
open("/usr/lib/tls/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/lib/tls/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/usr/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/lib/tls", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/usr/lib/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/lib/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/usr/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
open("/lib/powerpc-linux-gnu/tls/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/powerpc-linux-gnu/tls/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/lib/powerpc-linux-gnu/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/powerpc-linux-gnu/tls", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/lib/powerpc-linux-gnu/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/powerpc-linux-gnu/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/lib/powerpc-linux-gnu/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/powerpc-linux-gnu", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/usr/lib/powerpc-linux-gnu/tls/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/lib/powerpc-linux-gnu/tls/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/usr/lib/powerpc-linux-gnu/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/lib/powerpc-linux-gnu/tls", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/usr/lib/powerpc-linux-gnu/ppc603/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/lib/powerpc-linux-gnu/ppc603", 0x7f81f1c8) = -1 ENOENT (No such file or directory) open("/usr/lib/powerpc-linux-gnu/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/lib/powerpc-linux-gnu", 0x7f81f1c8) = -1 ENOENT (No such file or directory) writev(2, [{"./hello", 7}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libc.so.6", 9}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10./hello : error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
) = 116
exit_group(127)                         = ?
Process 298 detached


here is the ls -la output from my /lib directory:
-rwxrwxrwx    1 0        0          129612 Jan  1 00:00 ld-2.6.1.so
lrwxrwxrwx 1 0 0 11 Jan 1 00:00 ld.so.1 -> ld-2.6.1.so -rw-rw-rw- 1 0 0 5492 Jan 1 00:00 libBrokenLocale-2.6.1.so lrwxrwxrwx 1 0 0 24 Jan 1 00:00 libBrokenLocale.so.1 -> libBrokenLocale-2.6.1.so
-rw-rw-rw-    1 0        0           17796 Jan  1 00:00 libSegFault.so
-rw-rw-rw-    1 0        0           13904 Jan  1 00:00 libanl-2.6.1.so
lrwxrwxrwx 1 0 0 15 Jan 1 00:00 libanl.so.1 -> libanl-2.6.1.so
-rwxrwxrwx    1 0        0         1413588 Jan  1 00:00 libc-2.6.1.so
lrwxrwxrwx 1 0 0 13 Jan 1 00:00 libc.so.6 -> libc-2.6.1.so
-rw-rw-rw-    1 0        0          185876 Jan  1 00:00 libcidn-2.6.1.so
lrwxrwxrwx 1 0 0 16 Jan 1 00:00 libcidn.so.1 -> libcidn-2.6.1.so
-rw-rw-rw-    1 0        0           21916 Jan  1 00:00 libcrypt-2.6.1.so
lrwxrwxrwx 1 0 0 17 Jan 1 00:00 libcrypt.so.1 -> libcrypt-2.6.1.so
-rw-rw-rw-    1 0        0           13832 Jan  1 00:00 libdl-2.6.1.so
lrwxrwxrwx 1 0 0 14 Jan 1 00:00 libdl.so.2 -> libdl-2.6.1.so lrwxrwxrwx 1 0 0 13 Jan 1 00:00 libgcc_s.so -> libgcc_s.so.1
-rw-rw-rw-    1 0        0          369861 Jan  1 00:00 libgcc_s.so.1
-rw-rw-rw-    1 0        0          682292 Jan  1 00:00 libm-2.6.1.so
lrwxrwxrwx 1 0 0 13 Jan 1 00:00 libm.so.6 -> libm-2.6.1.so
-rw-rw-rw-    1 0        0           25980 Jan  1 00:00 libmemusage.so
-rw-rw-rw-    1 0        0           96060 Jan  1 00:00 libnsl-2.6.1.so
lrwxrwxrwx 1 0 0 15 Jan 1 00:00 libnsl.so.1 -> libnsl-2.6.1.so -rw-rw-rw- 1 0 0 34520 Jan 1 00:00 libnss_compat-2.6.1.so lrwxrwxrwx 1 0 0 22 Jan 1 00:00 libnss_compat.so.2 -> libnss_compat-2.6.1.so
-rw-rw-rw-    1 0        0           17940 Jan  1 00:00 libnss_dns-2.6.1.so
lrwxrwxrwx 1 0 0 19 Jan 1 00:00 libnss_dns.so.2 -> libnss_dns-2.6.1.so -rw-rw-rw- 1 0 0 46616 Jan 1 00:00 libnss_files-2.6.1.so lrwxrwxrwx 1 0 0 21 Jan 1 00:00 libnss_files.so.2 -> libnss_files-2.6.1.so -rw-rw-rw- 1 0 0 21996 Jan 1 00:00 libnss_hesiod-2.6.1.so lrwxrwxrwx 1 0 0 22 Jan 1 00:00 libnss_hesiod.so.2 -> libnss_hesiod-2.6.1.so
-rw-rw-rw-    1 0        0           46748 Jan  1 00:00 libnss_nis-2.6.1.so
lrwxrwxrwx 1 0 0 19 Jan 1 00:00 libnss_nis.so.2 -> libnss_nis-2.6.1.so -rw-rw-rw- 1 0 0 54956 Jan 1 00:00 libnss_nisplus-2.6.1.so lrwxrwxrwx 1 0 0 23 Jan 1 00:00 libnss_nisplus.so.2 -> libnss_nisplus-2.6.1.so
-rw-rw-rw-    1 0        0           13632 Jan  1 00:00 libpcprofile.so
-rwxrwxrwx    1 0        0          124981 Jan  1 00:00 libpthread-2.6.1.so
lrwxrwxrwx 1 0 0 19 Jan 1 00:00 libpthread.so.0 -> libpthread-2.6.1.so
-rw-rw-rw-    1 0        0           71488 Jan  1 00:00 libresolv-2.6.1.so
lrwxrwxrwx 1 0 0 18 Jan 1 00:00 libresolv.so.2 -> libresolv-2.6.1.so
-rw-rw-rw-    1 0        0           34788 Jan  1 00:00 librt-2.6.1.so
lrwxrwxrwx 1 0 0 14 Jan 1 00:00 librt.so.1 -> librt-2.6.1.so
-rw-rw-rw-    1 0        0           30428 Jan  1 00:00 libthread_db-1.0.so
lrwxrwxrwx 1 0 0 19 Jan 1 00:00 libthread_db.so.1 -> libthread_db-1.0.so
-rw-rw-rw-    1 0        0            9704 Jan  1 00:00 libutil-2.6.1.so
lrwxrwxrwx 1 0 0 16 Jan 1 00:00 libutil.so.1 -> libutil-2.6.1.so
drwxrwxrwx    3 0        0            1024 Jan  1 00:00 modules

Thanks!
--
Lauri Ehrenpreis



Reply to: