Clang is using the wrong memory model
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Aug 16 10:39:00 GMT 2019
On Aug 16 11:27, Agner Fog wrote:
> Thanks for your replies.
>
> A Cygwin application with -mcmodel=small appears to work fine.
>
> As I explained, -mcmodel=small does something else when the target is
> Windows. It does not require addresses to be below 2GB, it only requires the
> distance between a code section and it's data section to be below 2GB.
And that's the point. The distances are not guranteed to be within
2 GB. Think errno accessed from another DLL. Your application works
only by chance.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190816/e3a7b9d2/attachment.sig>
More information about the Cygwin
mailing list