diff options
author | Sven Gothel <[email protected]> | 2023-11-26 09:49:12 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-11-26 09:49:12 +0100 |
commit | c7efca6d9b0db7305f5352ebf15d915ae5a1fa24 (patch) | |
tree | 7ba72733c9296aea5ea339b3fd81d264b49d3e8c /src/java/jogamp/common/os/elf/ElfHeaderPart2.java | |
parent | aea14464d521dca28165498ffe943ef1122fc2e3 (diff) |
Bug 1479: NativeLibrary: Add getNativeLibraryPath() returning queried used native library path, supported throughout DynamicLibraryBundle[Info]
Motivation: It is helpful to retrieve the actually used native library pathname,
since loading a library w/o absolute path but lookup through LD_LIBRARY_PATH
may render it hard for the user to determine which library is used.
+++
+++
Windows implementation simply can use GetModuleFileNameA() with the native library handle.
POSIX implementation may utilize a symbol-name to retrieve its address within the
loading native library used to retrieved the library information
via dladdr().
To support this feature throughout DynamicLibraryBundle and DynamicLibraryBundleInfo,
the custom DynamicLibraryBundleInfo specializations shall provide
optional symbol-names per each tool-library-name for the POSIX implementation,
see above.
public interface DynamicLibraryBundleInfo {
...
/**
* Returns optional list of optional symbol names per {@link #getToolLibNames()}
* in same order for an OS which requires the symbol's address to retrieve
* the path of the containing library.
*/
public List<String> getSymbolForToolLibPath();
...
}
Diffstat (limited to 'src/java/jogamp/common/os/elf/ElfHeaderPart2.java')
0 files changed, 0 insertions, 0 deletions