RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols
suchismith1993
duke at openjdk.org
Fri Nov 17 12:48:36 UTC 2023
On Fri, 17 Nov 2023 12:06:48 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>>> > There is not generic way of generating this. It needs a manual intervention and symbols are to be added on a need basis in future. Looks like a list to be maintained. I had tried adding comments to explain the list, but that causes build failures.
>>>
>>> Would it be possible to paste the summary of the "instructions" to generate this? My initial reaction when seeing this PR is to wonder why it can't be generated at build time but from the discussion, it seems like it's a subset symbols, just the functions used by libjvm or is it all the native libraries?
>>
>> I just did a nm command and did a grep of " T " . That way i got all the symbols for math libraries. There were additional parsing instructions to remove the first column and remove periods at beginning.
>>
>> Then we had to remove certain symbols that are dependent on DFP symbols and xlc17 doesn't support them yet, So we had to trim down the list further, which is why it now becomes a list to be maintained.
>
> @suchismith1993: Can you add your explanations to the description at the top of this PR, please?
> I think restricting symbols to the ones from C standard makes sense.
> @magicus: We need a solution for JDK22 since the FFI including symbol lookup has become a required interface. RDP1 is coming closer and I don't see a better solution coming soon enough. Can we go ahead with a symbol list file for JDK22? Where should it reside if not in make/data/hotspot-symbols?
> @TheRealMDoerr A reasonable place to move the file to would be `src/java.base/aix/data/default-libraries-symbols/symbols`, or something like that. Data that is only used by a single module should be stored in that module, and if it is only used by a single OS it should be stored under that OS subdir. Feel free to chose a different name than `default-libraries-symbols` and for the actual file if you want, as long as it is descriptive enough.
>
> I still want to see some kind of documentation on how this list was created. This can be placed in the Lib.gmk file.
>
> And I still don't understand if this is the list of symbols that are required by our tests, or the complete list of symbols that FFI `defaultLookup` returns to user applications. If it is the latter, then this is sort-of okay as a final solution, but it is the former, I'm stll frowning upon this solution.
>
> But in the end, I realize that AIX is just being given the bare minimum of development time to stay functional, so maybe this'll just have to do.
The math library in AIX is not a shared object , hence we definitely need to statically link it.
Also there are parts of libc , that need to be statically linked , such as strlen,strcat etc.
Coming to the part of whole/partial list of symbols.
The list was generated by exporting entire math library to it.
But when we tested with xlc17, we saw some problematic symbols related to Decimal floating point which are not being supported by xlc17 currently. So had to trim down those symbols using the loadmap.
So do you suggest we keep this list (after moving to different location as you suggested ) ?
Trimming down the list to standard C functions may still be an issue as you are suggesting in your first option ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16414#issuecomment-1816355931
More information about the build-dev
mailing list