DST expansion is used for evaluation of dlopen() path. But the expansion is private to the libdl and cannot be evaluated for external applications. It would make sense to provide public API call to expand path: - Modules directory specification can use $LIB and application would be able to get a list of modules. - Application would be able to stat() the module with $LIB in the path to check whether such file exists, without actual loading them. Example of problem: https://bugzilla.gnome.org/show_bug.cgi?id=153848#c8