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: ld doesn't check for ld.so.1 in /lib


On Tue, Jul 29, 2003 at 08:21:49PM -0700, Ian Lance Taylor wrote:
> Robert Millan <zeratul2@wanadoo.es> writes:
> 
> > It seems that ld is looking for ld.so.1 in /usr/lib and in /usr/local/lib,
> > but not in /lib (which is the real location of ld.so.1).
> > 
> > Any tips on which part of the ld code determines the directories to check for?
> > I'm confused by the many references to /usr/lib and /usr/local/lib in src/ld.
> 
> This should be set by NATIVE_LIB_DIRS in ld/configure.tgt.  The
> default does include /lib, though.

I double-checked the NATIVE_LIB_DIRS assignment in ld/configure.tgt, and it
seems very clear that NATIVE_LIB_DIRS is properly assigned:

  NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
  case "${target}" in *-*-freebsd* | *-*-kfreebsd*-gnu)
  NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'

(no, i didn't forget to regenerate configure ;))

Looking at the strace log, it seems that there _are_ succesful attempts
at opening /lib/ld.so.1, which presumably use NATIVE_LIB_DIRS correctly,
but after these there's a new attempt that only checks for /usr/lib and
/usr/local/lib. Maybe this one is using a different path variable?

Btw, if any of you wants to have a quick look at it, I can give you access
to my GNU/FreeBSD development box. Just email me privately with your desired
username and initial temporary password and i'll setup your account.

Thanks,

-- 
Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T, Ainulindale (Silmarillion)


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