This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to stop ld from searching dependend libs?


On Mon, May 23, 2005 at 10:56:07AM +0200, Richter, Jörg wrote:
> How can I make ld behave the same like in (2) when building (1)?
> 
> To be exact: I want ld to print an error when the user hasn't
> supplied all libs he needs to build the executable. So I want the
> simple behavior and not the nifty dependend lib searching algorithm
> that ld uses in case (1). Is there an option to achieve this? I read
> 'man ld' up and down and found nothing.  Perhaps i'm just blind...

I don't think you can get ld to do that without removing the reference
to libB.so when linking libA.so; which is a bad idea on its own.

I don't know why you get the error when linking a shared library.  I
would not have expected to see it.  There's this bit of code in
gld*_after_open which is responsible:

  /* We only need to worry about this when doing a final link.  */
  if (link_info.relocatable || !link_info.executable)
    return;

But I would have expected to do DT_NEEDED checks for shared libraries
also.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]