Why does solib_open do what it does?

Kris Warkentin
2003-06-17T19:01:18Z

I'm looking at solib.c:solib_open() and as I go down the list:

Search order:
1 * If path is absolute, look in SOLIB_ABSOLUTE_PREFIX.
2 * If path is absolute or relative, look for it literally (unmodified).
3 * Look in SOLIB_SEARCH_PATH.
4 * If available, use target defined search function.
5 * Look in inferior's $PATH.
6 * Look in inferior's $LD_LIBRARY_PATH.

I'm puzzled. Why are we testing for the existence of solib_search_path
before checking 5 and 6?

cheers,

Kris