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

Suchismith Roy sroy at openjdk.org
Wed Mar 27 07:59:23 UTC 2024


On Tue, 26 Mar 2024 21:11:09 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 68:
>> 
>>> 66:             int dotIndex = name.lastIndexOf('.');
>>> 67:             String memberName = name.substring(openBracketIndex,dotIndex);
>>> 68:             //Reconstruct <libname>.so(<member_name>) as <libname>.a(<member_name>)
>> 
>> Do we really need to support libname.so(member)? Isn't it always libname.a(member)?
>
> 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 Correct. But, if .so file is given and it is not present , it will throw exception. So we should keep the mapAlternativeName for atleast .so to .a mapping(without any members  mentioned).

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

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


More information about the core-libs-dev mailing list