LDSCRIPTS

James E Wilson wilson@specifix.com
Thu Aug 11 03:34:00 GMT 2005


On Wed, 2005-08-10 at 20:22, John Pierce wrote:
> If my understanding is correct /etc/ld.so.conf is for already
> compilied programs looking for their shared libs.

Yes.

> So (btw, thanks for the url to doc) the linker is for linking libs to
> objects. I addressed the modification issue below, however if I were
> to put libs in nonstandard locations could I again modify the scripts
> to reflect?

Yes.  I don't know all of the details of how linker scripts work.  I've
never tried to modify installed ones.  I suggest looking at the linker
sources, or just trying it and see what happens.

> If I did do this will the linker know it was modified? Are you saying
> that if I did the linker will not use the script?

I don't know.  Just try it, or try looking at the linker sources.

> Is there a way to modify the configure to be only single lib? 
> I only found one occurance in the source for lib64 dealing with
> x86-64. And that was in (binutils source)/ld/configure.host.

gcc has a --disable-multilibs option that will prevent building multiple
libraries.  I don't know if binutils has an equivalent for the linker. 
I'm guessing no, because people generally don't worry about the linker
searching extra directories.  Generally, people only care when the
linker isn't searching enough directories, as that means you will get
linker errors.

The stuff in ld/configure.host you spotted is for running the ld
testsuite.  It isn't relevant.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com



More information about the Binutils mailing list