RFR: JDK-8319516 AIX System::loadLibrary needs support to load a shared library from an archive object [v17]
Martin Doerr
mdoerr at openjdk.org
Mon Apr 8 19:48:14 UTC 2024
On Mon, 8 Apr 2024 18:44:51 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 incrementally with one additional commit since the last revision:
>
> test change
test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java line 36:
> 34: String libraryName = "awt";
> 35: File awtSharedObjectPath = new File("/test/lib/libawt.so");
> 36: File awtArchivePath = new File("/test/lib/libawt.a");
How does this work? Did you create a "/test" directory? I don't have it on my machine.
test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java line 37:
> 35: File awtSharedObjectPath = new File("/test/lib/libawt.so");
> 36: File awtArchivePath = new File("/test/lib/libawt.a");
> 37: awtSharedObjectPath.renameTo(awtArchivePath);
This should work for this test. But, what if an AWT test gets executed after your test? I think copy is safer than renaming.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1556361989
PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1556360137
More information about the core-libs-dev
mailing list