[llvm] [Cygwin] Cygwin X86ISelDAGToDAG.cpp (PR #76284)

εΎζŒζ’ Xu Chiheng via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 10:51:07 PST 2024


xu-chiheng wrote:

> > > is the configure check is using the medium code model on cygwin? how large is the linked binary in the failing configure check? is it running into relocation overflows?
> > > providing the configure source file being compiled would be helpful
> > 
> > 
> > Yes, Cygwin 64 bit must use medium code model. Otherwise, there are runtime errors.
> 
> In which case we shouldn't be allowing the other code models to be enabled in the first place for cygwin64 triples, not trying to fixup later on - I'm pretty sure we already do this restriction in other cases.

The Cygwin 64 bit runtime, cygwin1.dll assume the module is compiled as cmodel medium,  so it can load and execute programs.
This assumption is hard coded.  
I'm not very familiar with source code of cygwin1.dll. But my guess is that, cygwin1.dll require specific pattern of symbol table, relocation table, the set of relocation entry kinds, so it can implement fork() using Win32 API.


https://github.com/llvm/llvm-project/pull/76284


More information about the llvm-commits mailing list