On Tue, 22 Apr 2025 21:08:56 GMT, Jiangli Zhou <jian...@openjdk.org> wrote:
> Please review this PR that changes to use `NativeLibraries.loadLibrary()` for > loading the `libsyslookup` in `jdk.internal.foreign.SystemLookup` class. > > `NativeLibraries.loadLibrary()` handles both the shared library and (static) > built-in library loading properly. On `static-jdk`, calling > `NativeLibraries.loadLibrary()` for `systlookup` library can find the > built-in library by looking up using `JNI_OnLoad_syslookup`. The current > change adds `DEF_STATIC_JNI_OnLoad` in syslookup.c (in shared, windows and > aix versions) for that purpose. > > In addition to GHA testing, I tested the change on static-jdk with jdk tier1 > tests on linux-x64 locally. All java/foreign/* jdk tier1 tests pass with the > change. Without the change, there are about 60 java/foreign/* jdk tier1 tests > fail on static-jdk. This pull request has now been integrated. Changeset: acd93df6 Author: Jiangli Zhou <jian...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/acd93df612525777656701821338caf9c81e5a6a Stats: 37 lines in 5 files changed: 20 ins; 7 del; 10 mod 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK Reviewed-by: mcimadamore, jvernee ------------- PR: https://git.openjdk.org/jdk/pull/24801