Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>POSIX does not support a mechanism to find out the directories on the shared library search path (it does not mandate <code>LD_LIBRARY_PATH</code>, for example), so any solution is inherently somewhat platform specific.</p> <p>Linux presents some problems because the values to be used could be based on the contents of <code>/etc/ld.so.conf</code> as well as any runtime value in <code>LD_LIBRARY_PATH</code> environment variable; other systems present comparable problems. The default locations also vary by system - with <code>/lib</code> and <code>/usr/lib</code> being usual for 32-bit Linux machines but <code>/lib64</code> and <code>/usr/lib64</code> being used on at least some 64-bit machines. However, other platforms use other locations for 64-bit software. For example, Solaris uses <code>/lib/sparcv9</code> and <code>/usr/lib/sparcv9</code>, for example (though the docs mention <code>/lib/64</code> and <code>/usr/lib/64</code>, they're symlinks to the <code>sparcv9</code> directories). Solaris also has environment variables <code>LD_LIBRARY_PATH_64</code> and <code>LD_LIBRARY_PATH_32</code>. HP-UX and AIX traditionally use other variables than <code>LD_LIBRARY_PATH</code> -- <code>SHLIB_PATH</code> and <code>LIBPATH</code>, IIRC -- though I believe AIX now uses <code>LD_LIBRARY_PATH</code> too. And, on Solaris, the tool for configuring shared libraries is 'crle' (configure runtime linking environment) and the analog of <code>/etc/ld.so.conf</code> is either <code>/var/ld/ld.config</code> or <code>/var/ld/64/ld.config</code>. Also, of course, the extensions on shared libraries varies (<code>.so</code>, <code>.sl</code>, <code>.dylib</code>, <code>.bundle</code>, etc).</p> <p>So, your solution will be platform-specific. You will need to decide on the the default locations, the environment variables to read, and the configuration file to read, and the relevant file extension. Given those, then it is mainly a SMOP - Simple Matter Of Programming:</p> <ul> <li>For each directory named by any of the sources: <ul> <li>Open the relevant sub-directory (<code>opendir()</code>) <ul> <li>Read each file name (<code>readdir()</code>) in turn</li> <li>Use <code>dlopen()</code> on the path of the relevant files.</li> <li>Do whatever analysis is relevant to you.</li> <li>Use <code>dlclose()</code></li> </ul></li> <li>Use <code>closedir()</code></li> </ul></li> </ul> <p>See also the notes in the comment below...the complete topic is modestly fraught with variations from platform to platform.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload