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

Mandy Chung mchung at openjdk.org
Wed Mar 27 16:47:24 UTC 2024


On Wed, 27 Mar 2024 08:47:10 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> @mlchung The first name constructed by Classloader is always lib<name>.so. So we need a way to map it to lib<name>.a . Else it will search for .so and fail.
>
> Right, the `loadLibraryOnlyIfPresent` change is sufficient for `System.load("libname.a(member)")` support. I don't know how common ".a" without member specification ist, but that may make sense. It sounds similar to what was done for MacOS with https://github.com/openjdk/jdk/commit/1e4dfcfbf00a9b17418bccc0dc746fd9a71f3a06.

> So we should keep the mapAlternativeName for atleast .so to .a mapping(without any members mentioned).

"libname.so(member_name)" is not a valid library name.   No reason why `System.load` has to support it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1541477181


More information about the core-libs-dev mailing list