------- Additional Comments From funtoos at yahoo dot com  2008-07-24 05:38 
-------
(In reply to comment #9)
> (In reply to comment #8)
> > > 
> > > You have a very strange setup. You better come up with a testcase
> > > which doesn't require me to copy things into /usr/lib.
> > 
> > so, don't copy. change the name libmylib.so to libcwait.so. Or pick another
> > library name which is in /usr/lib and use that. Only condition is binutils 
> > needs
> > to be installed in a prefix and the same library needs to be present in
> > $PREFIX/usr/lib/ and /usr/lib and with "-L$PREFIX/usr/lib -L/usr/lib", ld 
> > will
> > just pick the one form /usr/lib.
> 
> Please provide a testcase I can try.
> 

The bug reproduces only in a prefixed environment. And if you have a prefixed
binutils install, the steps mentioned by me should reproduce the problem:

1. run the script
2. cd /tmp/mydir
3 gcc -shared -o libcwait.so mysymbol.o
4 mv libcwait.so $PREFIX/usr/lib/libcwait.so
5. gcc -o mymain mymain.o -L$PREFIX/usr/lib -L/usr/lib -lcwait

You can use any other name for library. It should be already present in 
/usr/lib.

The link will fail with undefined symbol.

This is the minimal I can do. The bug is pretty obvious in prefix env.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6753

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to