Regression for Native Library Loading in 11.0.5 on Linux

Florian Weimer fw at deneb.enyo.de
Sat Feb 15 09:52:07 UTC 2020


* David Holmes:

> In JDK 11 we stopped using mapfiles:
>
> https://bugs.openjdk.java.net/browse/JDK-8200178
>
> which is where the SUNWprivate_1.1 label previously came from.

This is not a backwards-compatible change under the GNU implementation
of symbol versioning.  If there are external libraries linking against
these symbols, they will fail to load because there is a sanity check
in glibc for missing symbol versions, and the removal of the versions
triggers that.

This check is intended to avoid late application crashes when using
lazy binding.  Symbol versions denote sets of symbols, and if a
version is missing, it means that not all the required symbols are
present.  I assume the rationale for this is that failing at load time
was deemed better than late failures, e.g., when the user hits Save
and loses important work.

The real question here is whether linking against libjawt.so in this
way something that has to be supported by OpenJDK.

I wrote a patch to support preloading of new symbol versions, which
would allow end users to get this working again (without recompiling
anything in this case):

  <https://sourceware.org/ml/libc-alpha/2019-09/msg00120.html>

But it's not really a solution for software distribution.


More information about the jdk-dev mailing list