[foreign-preview] RFR: 8282873: Bring back SymbolLookup
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Thu Mar 10 21:47:05 UTC 2022
On Thu, 10 Mar 2022 21:32:55 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/SymbolLookup.java line 126:
>>
>>> 124: */
>>> 125: @CallerSensitive
>>> 126: static SymbolLookup libraryLookup(String name, MemorySession session) {
>>
>> This could just call the Path version, creating a path from the name (or vice versa), rather than duplicating the code.
>
> This cannot call the path version. Note that `dlopen` has its own "known" library names. On linux I can open `libc.so.6` by name, and the correct file fill be found, using the linker cache. MacOS also has some notion of libraries that are not really files: https://developer.apple.com/forums/thread/655588
In other words, note that the two methods are using different methods in the `RawNativeLibraries` class.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/666
More information about the panama-dev
mailing list