Send MinGW-Notify mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."
Please do not reply to this notification; the sender address is unable to
accept incoming e-mail. If you wish to unsubscribe you can do so at
https://lists.osdn.me/mailman/listinfo/mingw-notify.
Today's Topics:
1. [mingw] #48962: Error starting c++ program linking to
libstdc++-6.dll on Windows 9x without KernelEx
(MinGW Notification List)
----------------------------------------------------------------------
Message: 1
Date: Thu, 08 Feb 2024 18:20:55 +0000
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #48962: Error starting c++ program
linking to libstdc++-6.dll on Windows 9x without KernelEx
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#48962: Error starting c++ program linking to libstdc++-6.dll on Windows 9x
without KernelEx
Open Date: 2023-12-30 10:41
Last Update: 2024-02-08 18:20
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/48962
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=48962
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2024-02-08 18:20 Updated by: keith
Comment:
Reply To qiannangong
I've attached a screenshot from a Windows 98 SE VM to reproduce this issue.
So, failure occurs before the dynamic linker (a.k.a. the Windows program
loader) even attempts to pass control to the program entry point. Failure is
the result of the dynamic linker's attempt to resolve a CreateHardLinkW()
reference, while loading libstdc++-v6.dll; as you have noted, this symbol is
not present in Win9x;s kernel32.dll (whence it is expected to be exported).
Technically, this is a gratuitous misuse of the CreateHardLink() API, within
libstdc++-v6.dll, (which is maintained by the GCC project, not by us).
However, the GCC project team are unlikely to view any related bug report
sympathetically; they are more likely to dismiss it, on the premise that Win9x
is no longer supported. Thus, we need to provide our own workaround, if we
wish to preserve such legacy support.
A possible solution may be to remove the gratuitous declaration of
CreateHardLinkW@12, as a libkernel32.dll export, from our kernel32.def source
file, and add a pre-compiled variant of the stub code, which I suggested
previously, to our libkernel32.a import library. I can make this modification,
and post it here, but I will need your participation to test it, before I
incorporate it formally into our w32api distribution.
And btw, LTO is not available on Windows 9x either.
That certainly appears to be the case. However, you have already demonstrated
the solution; you may wish to add the -fno-lto option to your GCC specs file,
on your Win9x platform, to ensure that it is always specified, when you compile
on that platform.
---------------------------------------------------------------------
Ticket Status:
Reporter: qiannangong
Owner: (None)
Type: Issues
Status: Open
Priority: 5 - Medium
MileStone: (None)
Component: (None)
Severity: 5 - Medium
Resolution: None
---------------------------------------------------------------------
Ticket details:
LIBSTDC++-6.DLL bundled in latest package requires an export named
CreateHardLinkW in KERNEL32.DLL, which seems not to be available on vanilla
Windows 9x platform...
However, A static linked program may work only if it does not use the APIs may
refer to the CreateHardLinkW.
--
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN
Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net
URL for this Ticket:
https://osdn.net/projects/mingw/ticket/48962
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=48962
------------------------------
Subject: Digest Footer
_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify
------------------------------
End of MinGW-Notify Digest, Vol 62, Issue 1
*******************************************