Then again: Why would you need to know the Filesystem-location of the library within its own code?
Because of any search path the loader might apply. In e.g. a tech support environment you'd very much want to know what /actual/ file was loaded. Another case is where a dynamically-loaded library loads another library dynamically, with the handles being available but not the names.
MarkMLl
Sorry, still not getting it.
A shared library is accessed from a „host“-application.
Irrespective if static or dynamic, the lib has to be „findable“ for the host, otherwise it fails to run the code inside the lib.
If he wants to know the libs location from within its own code, the code of the lib must have been called, meaning its host has found it, meaning its location is known