RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Mar 21 22:25:26 UTC 2024


On Thu, 21 Mar 2024 22:04:28 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> (I'm pessimistic)

To summarize: I think that allowing version-specific names (even if surrounded by parenthesis) in `System::loadLibrary` would be very odd. After all, `System::loadLibrary` doesn't support versioned names, even on other systems (and adding support for versioned library names across different platforms is a much bigger effort).

For this reason, the only thing that would make sense for `loadLibrary` to support is `clang` which will be expanded (by `mapLibraryName`) to `clang(libclang.so)`. But, even assuming this works: wouldn't we still have an issue? As far as I understand (and given the code in this patch), we don't really know (before calling `dlopen`) whether the suffix is needed or not: whether it's an archive with an `.so` inside, or whether it's a plain `.so`. So how can the behavior of `mapLibraryName` be deterministic?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17945#issuecomment-2013954504


More information about the core-libs-dev mailing list