Ralf Wildenhues wrote: > libreadline depends upon libtermcap, but does not announce this > dependency with a DT_NEEDED entry (i.e., -ltermcap was not passed > to the command creating libreadline.so). This is arguably a bug > in libreadline (but probably done intentionally to allow choosing > either termcap or ncurses or so). > > To work around it in the test, I suppose you can link a program > that also requires a symbol from termcap. > > Anyway, I thought CVS binutils had a patch to deal with this setup, > but reading the ld/NEWS entry, I'm not so sure anymore whether it > is sufficient: > > * --as-needed now links in a dynamic library if it satisfies undefined > symbols in regular objects, or in other dynamic libraries. In the > latter case the library is not linked if it is found in a DT_NEEDED > entry of one of the libraries already linked. > > Hope that helps.
Thanks, Ralf. With that, I should be able to work around it.