When ld-linux resolves a symbol it searches through the shared libraries in a particular order and stops when it finds a shared library with a matching symbol.
What determines the order it searches through the libraries? Does it make a difference if the unresolved symbol is in the main program or in another shared library?
How could I determine the search order programatically without calling external programs like ldd?