the way ld evaluates and chooses libraries

Jeremy Monnet jmonnet@gmail.com
Fri Oct 6 12:58:00 GMT 2006


Hi,

Hope I'm coming to the right place to ask my question.

I needed for work to compile a c++ program on a linux box. This
program did link on some machines, and did not on others. After many
research we found that it was a bug in the last oracle patch of
libocci.so.9.0 . The problem was on the system with last update, this
lib was looking for libstdc++.so.5 instead of version 6. But all the
other part of the program were by way also trying to link to version 5
instead of 6.

So I was wondering how did ld was selecting its libraries ? I believe
there is a kind of optimisation : after looking to all the
dependencies, ld tries to shorten the list of libraries to link
against. Am I right ?
Any pointer on documentation, etc would be appreciated.

Regards,

Jeremy
PS : I am not on the list, so please CC me when replying. Thanks a lot !
-- 
Linux Registered User #317862
Linux From Scratch Registered User #16571
Please do not send me .doc, .xls, .ppt, as I will *NOT* read them.
Please send me only open formats, as OpenDocument or pdf.



More information about the Binutils mailing list