[Top][All Lists]

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

Re: --as-needed linker option causes trouble with -lreadline/-ltermcap

From: Jim Meyering
Subject: Re: --as-needed linker option causes trouble with -lreadline/-ltermcap
Date: Sat, 28 Mar 2009 17:17:08 +0100

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.

reply via email to

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