[foreign-abi] RFR: 8249803: Add LibraryLookup.Symbol

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Jul 21 14:54:06 UTC 2020


This patch adds the LibraryLookup.Symbol, which implements Addressable, and that is returned on a successful symbol
lookup. This patch also tweaks VaList to also implement the Addressable interface (VaList already had an `address()`
method).

The `ForeignLinker::downcallHandle` method has been tweaked to accept an Addressable as a function entry point. This
allows downcall handle to target not only native symbols, but also upcall stubs (since upcall stubs are segments, which
are addressable) as well as native memory addresses.

Some tests needed minor tweaks.

-------------

Commit messages:
 - Add LibraryLookup.Symbol

Changes: https://git.openjdk.java.net/panama-foreign/pull/256/files
 Webrev: https://webrevs.openjdk.java.net/panama-foreign/256/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8249803
  Stats: 72 lines in 19 files changed: 37 ins; 1 del; 34 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/256.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/256/head:pull/256

PR: https://git.openjdk.java.net/panama-foreign/pull/256


More information about the panama-dev mailing list