On Mon, 6 Apr 2026 09:05:50 GMT, Yasumasa Suenaga <[email protected]> wrote:
>> 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>'. > > Hi, > I know this PR/issue has been closed, but I want to ask on this thread > because experts seems to follow this. > > I wonder why `SystemLookup` depends on `libsyslookup` on Linux. > > I understand syslookup.dll is needed for Windows because some functions might > not be lookup'ed. OTOH on Linux, `dlsym` can lookup symbols from library > dependencies. In `SystemLookup`, handle of `libsyslookup` would be passed to > `dlsym` eventually, but I think it is better to pass `RTLD_DEFAULT` in this > case. I know it works when the handle of `libsyslookup` is passed, but > `RTLD_DEFAULT` is better because Javadoc of `Linker::defaultLookup` says it > returns a set of commonly used libraries. I guess the reson of use > `libsyslookup` is to use `NativeLibraryImpl`. > > I think we can fix not to use `libsyslookup` like > https://github.com/YaSuenag/jdk/commit/b125cc164d60ac14316549e59d18544d75f6fcb2 > . It works on Linux (including static image of course). If it does not have > a problem, I want to create JBS issue and PR for this. Do you have any > comments? > > In addition, I guess we can apply this change to all of POSIX platforms > because `dlsym` is defined in POSIX, but I'm not sure we can do (especially > AIX - it has own syslookup.c in JDK source tree). Hello @YaSuenag, it would be better to bring this discussion to the mailing lists. I think core-libs-dev mailing list would be suitable https://mail.openjdk.org/mail/lists/core-libs-dev.openjdk.org/ ------------- PR Comment: https://git.openjdk.org/jdk/pull/24801#issuecomment-4196440125
