RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols [v5]

Magnus Ihse Bursie ihse at openjdk.org
Tue Nov 21 13:51:18 UTC 2023


On Tue, 21 Nov 2023 13:01:50 GMT, suchismith1993 <duke at openjdk.org> wrote:

>> The math library in AIX specifically, is a static archive. Doing a -lm wont suffice, because when the symbols are looked up using dlsym or accessing native code through Java, it will lead to failures.
>> Hence we had to come up with a list of symbols to allow math library symbols to be accesible.
>> Also, there are parts of libc library that are static too, and hence those symbols also are present in this list.
>> Without this change, the StdLibTest and multiple other tests which make native function calls using FFI, fail with NoSuchElementException.
>> 
>> 
>> 1. Adding required compiler flags.
>> 2. Adding required symbols.
>> 
>> 
>> JBS-ISSUE : [JDK-8317799](https://bugs.openjdk.org/browse/JDK-8317799)
>
> suchismith1993 has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Update Copyright
>  - Revert lookup file in share directory.
>    Add lookup file for AIX specific implementation.

This looks like a much saner solution than the original attempt.

src/java.base/aix/native/libsyslookup/syslookup.c line 33:

> 31: #include <math.h>
> 32: 
> 33: // Simple dummy function so this library appears as a normal library to tooling.

I assume this comment should be on line 207 instead..?

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

PR Comment: https://git.openjdk.org/jdk/pull/16414#issuecomment-1820957256
PR Review Comment: https://git.openjdk.org/jdk/pull/16414#discussion_r1400626367


More information about the build-dev mailing list