[Top][All Lists]

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

[Bug gold/15478] -no-as-needed required to avoid runtime symbol lookup e

From: ccoutant at google dot com
Subject: [Bug gold/15478] -no-as-needed required to avoid runtime symbol lookup error
Date: Thu, 16 May 2013 23:51:51 +0000


--- Comment #1 from Cary Coutant <ccoutant at google dot com> 2013-05-16 
23:51:51 UTC ---
> situation (see attached tar.bz2 to reproduce):
> libmylib.so has unresolved symbols that are found in libmyplugin.so
> myapp.c++ calls into libmylib.so
> myapp.c++ is being compiled with -lmylib and -lmyplugin
> expected behaviour, and behaviour with gnu ld:
> myapp is linked against mylib and myplugin
> observed behaviour:
> myapp is only linked against mylib since it does not make direct calls into
> myplugin
> myapp is not executable (fails with message about myplugin symbols not being
> resolved in mylib)
> workaround:
> link with -no-as-needed
> Can you comment on this observed behaviour?  thanks

I think this is intended behavior for gold. It's expected that each
library will have its own dependencies recorded so that we only record
direct dependencies in the dynamic table. In your case, since
libmylib.so has references to libmyplugin.so, there should be a
DT_NEEDED entry in libmylib.so for libmyplugin.so. If you link
libmylib.so with -L. -lmyplugin, it should work.


Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]