Clang is using the wrong memory model
Agner Fog
agner@agner.org
Fri Aug 16 10:50:00 GMT 2019
On 16/08/2019 11.52, Corinna Vinschen wrote:
> 2 GB. Think errno accessed from another DLL. Your application works
> only by chance.
Good example.
errno appears to be a global variable for historical reasons, but errno
is implemented as a macro that translates to a call to the imported
function __errno.
This function call goes through a 64-bit import table from cygwin1.dll
Works fine with -mcmodel=small
Static sharing of a global variable between exe and dll, or between
different dll's is not possible.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list