> 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.
Jiangli Zhou has updated the pull request incrementally with two additional commits since the last revision: - Merge branch 'JDK-8355080' of ssh://github.com/jianglizhou/jdk into JDK-8355080 - Address henryjen@ comment: - Remove '#include <jni.h>'. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24801/files - new: https://git.openjdk.org/jdk/pull/24801/files/11f674c6..6661b815 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24801&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24801&range=01-02 Stats: 3 lines in 3 files changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/24801.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24801/head:pull/24801 PR: https://git.openjdk.org/jdk/pull/24801