Each executable contains a list of pathes for loading dynamic library. You can get this list using:
or
readelf -d executable_name
chrpath -l executable_name
And it is possible to change this path using:
chrpath -r new_path_separated_by_double_colon executable_name
There are more detailled explanation here: http://www.eyrie.org/~eagle/notes/rpath.html