This is the mail archive of the 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: i386-pc-nto-qnx patch

Thanks, Alan.

I don't think that the way you are suggesting we do it matches
well with our cross development setup, since the shared libraries
are not in the same place on the target.  I'll have to check and
verify, though.

Also, the reason that we initially had this done was because we were
linking against shared libs in a staging area, but the DT_NEEDED
dependecies were not looking there, causing all sorts of symbol problems
since they were linking against the outdated installed versions.

However, this is mostly an internal thing, so I am happy to just leave
that part out of the patch.  Should I re-create a patch without that
#if 0 and #endif?  Or is it small enough to just be omitted?

Thanks again.


> I'll review the rest later, just addressing this particular point here.
> On Wed, Apr 17, 2002 at 04:05:10PM -0400, Graeme Peterson wrote:
> > - ld/emultempl/elf32.em
> >   I have a #if 0 with a comment.  This is so you can see
> >   why I think the code should be removed in the general case
> >   for everyone, and then we can comment on the correctness
> >   or lack thereof.
> > + 	  #if 0
> > + 	      /* This was removed to allow the linker to search in library
> > + 	         paths supplied at the command-line when looking for libs that
> > + 	         are in DT_NEEDED sections of shared libraries. 
> > + 	         GP March 25, 2002 */
> > + 
> >   	      if (search->cmdline)
> >   		continue;
> > + 	  #endif
> Did you read the following comment?
>       /* We need to find this file and include the symbol table.  We
> 	 want to search for the file in the same way that the dynamic
> 	 linker will search.  That means that we want to use
> 	 rpath_link, rpath, then the environment variable
> 	 LD_LIBRARY_PATH (native only), then the DT_RPATH/DT_RUNPATH
> 	 entries (native only), then the linker script LIB_SEARCH_DIRS.
> 	 We do not search using the -L arguments.
> 	 We search twice.  The first time, we skip objects which may
> 	 introduce version mismatches.  The second time, we force
> 	 their use.  See gld${EMULATION_NAME}_vercheck comment.  */
> Particularly the phrase "same way that the dynamic linker will search".
> That's why -L shouldn't change the search path for shared libraries.
> If you really want to do something weird with shared lib search paths,
> you should be using -rpath-link (which affects just the linker), or
> -rpath (which affects linker and dynamic linker).
> -- 
> Alan Modra
> IBM OzLabs - Linux Technology Centre

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