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

Mandy Chung mchung at openjdk.org
Thu Mar 28 17:00:37 UTC 2024


On Wed, 27 Mar 2024 17:23:50 GMT, Suchismith Roy <sroy at openjdk.org> wrote:

>> Allow support for both .a and .so files in AIX.
>> If .so file is not found, allow fallback to .a extension.
>> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516)
>
> Suchismith Roy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
> 
>  - remove member check
>  - update comment
>  - coding style
>  - set false
>  - restore fil
>  -  remove member check code
>  - trraling spaces
>  - trailing spaces
>  - remove space
>  - remove debug print lines
>  - ... and 6 more: https://git.openjdk.org/jdk/compare/4434d52f...4c068e78

`System::loadLibrary("systeminfo")` should call `JVM_LoadLibrary` with "/usr/lib/libsysteminfo.so" argument (let the .a file exists under "/usr/lib") which in turn calls `os::dll_load`.    JDK-8320005 changed `os::dll_load` to first load the given filename; if fails, it will call `dll_load_library` with "/usr/lib/libsysteminfo.a".    

You can turn on `-Xlog:library` and it should print log message loading "/usr/lib/libsysteminfo.so"  if you have `loadLibraryOnlyIfPresent` to return false. If you don't see log message loading "/usr/lib/libsysteminfo.so", `loadLibraryOnlyIfPresent` still returns true.

Turn on "-Xlog:os" should print "attempting shared library load of /usr/lib/libsysteminfo.so" and "attempting shared library load of /usr/lib/libsysteminfo.a" log message.

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

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


More information about the core-libs-dev mailing list