Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pack200 native implemention #370

Merged
merged 38 commits into from
Jun 30, 2023
Merged

Pack200 native implemention #370

merged 38 commits into from
Jun 30, 2023

Conversation

wasabii
Copy link
Contributor

@wasabii wasabii commented Jun 25, 2023

In an effort to get Pack200 working for #364, this PR implements P2P references for ClangProjects, implements libverify #368, libjvm #366, libjava #367 and libunpack.

…d up replaced with libjava. Unsure.

New libjvm project to produce jvm.dll and libjvm.so. This mimics the same on OpenJDK. Contains exported functions that need to be initialized by the runtime.
…native lib.

Added libunpack. Need to clear up symbols still.
Loading libjvm and initializing in JNIVM. Might not be the best place for it.
Remove NativeUnpack extern, replace with libunpack. Crazy town.
@wasabii
Copy link
Contributor Author

wasabii commented Jun 25, 2023

libjvm is basically hotspot. It will largely consist of hand-written functions that are not part of OpenJDK, but instead short trampolines that simply call into .NET code, and manipulate IKVM structures. This should be good in the short term, as long as libjvm is loaded up at IKVM startup: as long as .NET is already running.

However, long term, libjvm should more properly implement the actual libjvm API: the ability to link against it to actually host a full VM. This would potentially allow Java applications which make use of libjvm.so, etc, directly, to instead link against the IKVM VM, spawn .NET, etc.

To do this, libjvm is going to need to have .NET Core and Framework hosting code, to spawn up the CLR.

@wasabii
Copy link
Contributor Author

wasabii commented Jun 25, 2023

fixes #364 #366 #367 #368

Disable some warnings.
…e can load libjvm up front without going through Java logic.
Add a fake JNI_OnLoad and JNI_OnUnload method to libunpack and libsunec. What happens here is that these depend on libjava, and dlsym(3) on Linux returns the JNI_OnLoad from libjava when looking for the function from the top library. OpenJDK avoids this because libjava loads first.
Add libfdlibm to output.
Use RUNPATH. It's technically better. Remove quotes.
@wasabii wasabii merged commit 37e3bf3 into develop Jun 30, 2023
67 checks passed
@wasabii wasabii deleted the feature/pack200 branch June 30, 2023 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant