RFR: 8346388: Cannot use DllMain in libawt for static builds
Phil Race
prr at openjdk.org
Wed Dec 18 19:37:36 UTC 2024
On Tue, 17 Dec 2024 11:51:51 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> There are multiple DllMain definitions throughout the JDK native libraries, causing name collisions.
DllMain is a default name, not a required name.
You could just rename them and add /entry to the linker command line, eg /entry:AwtDllMain
https://learn.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol?view=msvc-170&viewFallbackFrom=vs-2019
I'm not sure it seems right to have every static destructor need to know what needs to be done to exit the DLL.
I do read your comment about not knowing when the static destructors are called vs the DllMain on shutdown, but surely this *is* well defined ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22790#issuecomment-2552120496
More information about the client-libs-dev
mailing list