This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils-2.11 ld testsuite problems + PATCH
Hello Sir,
Thanks for the reply...
"H . J . Lu" wrote:
>
> On Tue, May 08, 2001 at 10:11:10AM -0700, Matthew Schalit wrote:
> >
> > > > /usr/local/bin/ld: warning: /usr/lib/libc.so.1, needed by ./libpbm.so,
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Could you please send me
>
> # readelf -d ./libpbm.so
Certainly. Here's what I saw from my system:
$ readelf --version
GNU readelf 2.10.1
Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
-------------------------------------------------------------------------
$ readelf -d ./libpbm.so
Dynamic segment at offset 0xdb78 contains 18 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [/usr/lib/libc.so.1]
0x0000000e (SONAME) Library soname: [libpbm.so.9]
0x0000000f (RPATH) Library rpath: [/usr/lib:/usr/local/lib:/usr/ccs/lib:/usr/local/BerkeleyDB/lib]
0x0000000c (INIT) 0x2250
0x0000000d (FINI) 0x6fb0
0x00000004 (HASH) 0x94
0x00000005 (STRTAB) 0xd20
0x00000006 (SYMTAB) 0x4c0
0x0000000a (STRSZ) 1360 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000003 (PLTGOT) 0xea80
0x00000002 (PLTRELSZ) 424 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x20a0
0x00000011 (REL) 0x1270
0x00000012 (RELSZ) 3632 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000000 (NULL) 0x0
-------------------------------------------------------------------------
> # readelf -d some DSO in /usr/lib other than libc.so.1.
Here's -lnsl and -lsocket, so you can see a little variety,
but still have them both be SCO system libraries:
-----------------------------------------------------------------------------
Yoda:/usr/lib>$readelf -d ./libnsl.so
Dynamic segment at offset 0xecc0 contains 15 entries:
Tag Type Name/Value
0x0000000c (INIT) 0x20b80
0x0000000e (SONAME) Library soname: [/usr/lib/libnsl.so.1]
0x00000004 (HASH) 0x94
0x00000005 (STRTAB) 0x88cc
0x00000006 (SYMTAB) 0x225c
0x0000000a (STRSZ) 19900 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000003 (PLTGOT) 0x4b254
0x00000002 (PLTRELSZ) 3384 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0xdf88
0x00000011 (REL) 0xd688
0x00000012 (RELSZ) 2304 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000000 (NULL) 0x0
-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Yoda:/usr/lib>$readelf -d ./libsocket.so
Dynamic segment at offset 0x41d4 contains 16 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [/usr/lib/libnsl.so.1]
0x0000000c (INIT) 0xc3c0
0x0000000e (SONAME) Library soname: [/usr/lib/libsocket.so.2]
0x00000004 (HASH) 0x94
0x00000005 (STRTAB) 0x2804
0x00000006 (SYMTAB) 0xd74
0x0000000a (STRSZ) 4743 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000003 (PLTGOT) 0xf5c0
0x00000002 (PLTRELSZ) 1360 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x3c84
0x00000011 (REL) 0x3a8c
0x00000012 (RELSZ) 504 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000000 (NULL) 0x0
--------------------------------------------------------------------------------
> I think I fixed this bug last week. Basically, ld should only put the
> basename of a DSO in DT_NEEDED.
I sort of thought that was the idea. When the pathname is absent,
doesn't the system search the LD_LIBRARY_PATH or LD_RUN_PATH
for the dependant libraries and indicate them in the ldd output
as
libc.so => /usr/lib/libc.so.1
as versus hard coded like:
/usr/lib/libc.so.1
> Please try binutils from CVS or the next release of my Linux binutils.
>
> H.J.
I'll download CVS after lunch, build it and run a gmake check-ld
on it. Isn't this "can't find -lc" problem I'm having with netpbm
the same as the check-ld problem finding -lc?
Thanks!
Matthew