Clang is using the wrong memory model

Agner Fog
Sun Aug 18 18:14:00 GMT 2019

On 18/08/2019 13.57, Corinna Vinschen wrote:
> Nope, Cygwin uses the Windows loader. 

Then, how do you do the extra linking? What is producing the "Cygwin 
runtime failure" message when loading/linking a DLL fails?

>   If the medium model is wasteful in clang, that's a clang
> optimization problem, not a Cygwin problem.

The medium model in Clang is not wasteful. It does exactly what it is 
designed to do. It was never designed with Cygwin in mind. The program 
build with a medium model is wasteful because it makes all addresses 64 
bits when few or no addresses actually need to be 64 bits.

> If you want to use the small model in your own projects, great, if it
> works for you.
It is not for my own project. I am writing manuals on how to optimize 


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list