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

Re: libgtk1.2 is broken



I found out where lstat is supposed to come from:

$ cat /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6.1 /usr/lib/libc_nonshared.a )
$
$ objdump --syms /usr/lib/libc_nonshared.a
...
lstat.oS:     file format elf64-alpha

SYMBOL TABLE:
0000000000000000 l    d  .text  0000000000000000 
0000000000000000 l    d  .data  0000000000000000 
0000000000000000 l    d  .bss   0000000000000000 
0000000000000000 l       *ABS*  0000000000000000 *ABS*
0000000000000000 l    d  .comment       0000000000000000 
0000000000000000  w    F .text  0000000000000038 0x88 lstat
0000000000000000 g     F .text  0000000000000038 0x88 __lstat
0000000000000000         *UND*  0000000000000000 __lxstat
...
$
$ objdump --dynamic-syms /lib/libc.so.6.1 | grep __lxstat
00000000000f89a0 g DF .text 0000000000000250 GLIBC_2.0 0x88 __lxstat
00000000000f89a0 g DF .text 0000000000000250 GLIBC_2.1 0x88 __lxstat64

As far as I can tell, what this means is that when the linker
processes an object module that wants to call lstat(), the lstat.oS
module is supposed to be statically linked to the emitted binary. The
lstat() code calls __lxstat(), which the dynamic loader gets at
runtime from libc.so.6.1 .

Apparently, for reasons unknown, the lstat.oS module is not getting
attached to either the libgtk1.2 shared library or the executable
binaries dynamically linked against it. Which of these two
possibilities is supposed to occur, I don't know.

I still don't understand why I'm the only one having this
problem. Chris, could you please try the following and report the
results:

$ which gimp
/usr/bin/X11/gimp
$ 
$ ldd /usr/bin/X11/gimp | grep -e libc -e libgtk
    libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x0000020000032000)
    libc.so.6.1 => /lib/libc.so.6.1 (0x0000020000738000)
$ 
$ objdump --syms /usr/bin/X11/gimp | grep lstat\$
objdump: /usr/bin/X11/gimp: no symbols
$ objdump --dynamic-syms /usr/bin/X11/gimp | grep lstat\$
$ 
$ objdump --syms /lib/libc.so.6.1 | grep lstat\$
$ objdump --dynamic-syms /lib/libc.so.6.1 | grep lstat\$
$ 
$ objdump --syms /usr/lib/libgtk-1.2.so.0 | grep lstat\$
objdump: /usr/lib/libgtk-1.2.so.0: no symbols
$ objdump --dynamic-syms /usr/lib/libgtk-1.2.so.0 | grep lstat\$
0000000000000000      DF *UND*  0000000000000038            0x88 lstat

There's the unresolved reference. Since it works OK for you, your
results should be different. If happens that there are no hits, try it
again on unstripped versions of the same files (the "no symbols" error
means that the file is stripped and statically linked symbols are
lost).

Hopefully we can clear this up. Thanks again for your help.


Ian Bruce


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1



Reply to: