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]

Re: elf32.em check_needed


   Date: Sat, 30 Sep 2000 15:31:59 +1100 (EST)
   From: Alan Modra <alan@linuxcare.com.au>

     Can you tell me why the check_needed function tests search_dirs_flag
   before comparing filenames?  In cases where the soname doesn't match, the
   effect is to make a library specified as "-Lsomepath -lfoo" match, while
   specifying the lib as "somepath/libfoo.so" doesn't match.  Seems wrong to
   me, but maybe I'm missing something.

I think my intention was that if the file name didn't match exactly
(tested at the top of the function) then we should only match if the
linker was going to search for the file.  Of course the real question
is whether the dynamic linker is going to search for the file.  If the
dynamic linker is going to search, then it makes some sense to match
on the last component of the filename.  If the dynamic linker is not
going to search, then it doesn't make sense to do that match.

I'm not sure whether search_dirs_flag is the right test for that, but
it might be.  I think it depends on the DT_NEEDED entry that the
linker makes, assuming there is no DT_SONAME entry in the given shared
object.

Ian

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