RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v5]
Martin Doerr
mdoerr at openjdk.org
Wed Mar 27 08:49:26 UTC 2024
On Wed, 27 Mar 2024 08:23:53 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
>> I think `mapAlternativeName` isn't needed at all. If `loadLibraryOnlyIfPresent` returns false, `System.load("libname.a(member)")` should be passed to dlopen directly. @suchismith1993 can verify it.
>
> @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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1540686268
More information about the core-libs-dev
mailing list