On Wed, 27 Mar 2024 08:23:53 GMT, Suchismith Roy <[email protected]> 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