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]

ld doesn't check for ld.so.1 in /lib


[ please CC me, i'm not subscribed ]

Hi again,

As I just said, ld has some trouble when running on GNU/FreeBSD. The
problem is that it's unable to find ld.so.1:

  $ gcc hello.c -o /dev/null
  /home/rmh/tmp/toolchain/install/bin/ld: warning: ld.so.1, needed by /lib/libc.so.1, not found (try using -rpath or -rpath-link)
  [...]

By running ld under strace, I obtained this:

  open("/usr/lib/ld.so.1", O_RDONLY)      = -1 ENOENT (No such file or directory)
  open("/usr/local/lib/ld.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
  write(2, "\0\0", 2ld)                     = 2
  [warning message follows]

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.

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]