PATCH: Updated version of x86_64-pc-mingw32 support of gcc.

Kai Tietz Kai.Tietz@onevision.com
Mon Mar 19 16:47:00 GMT 2007


Michael Matz <matz@suse.de> wrote on 19.03.2007 17:15:46:

> Hi,
> 
> On Mon, 19 Mar 2007, Kai Tietz wrote:
> 
> > > Just from a quick glance:
> > > 
> > > > -       ix86_cmodel = flag_pic ? CM_SMALL_PIC : CM_SMALL;
> > > > +       ix86_cmodel = (TARGET_64BIT_MS_ABI ? (flag_pic ? 
CM_MEDIUM_PIC 
> > : 
> > > > CM_MEDIUM) : (flag_pic ? CM_SMALL_PIC : CM_SMALL));
> > > 
> > > The ix86_cmodel is there to handle varoius ABI derrivations,
> > > perhaps we can use it for MS abi as well?  Ie add CM_MSABI.
> > > The MS ABI can then be available with -mcmodel=msabi for projects 
such
> > > as wine.
> > 
> > The code-model should be LARGE for MS-ABI.
> 
> For x86-64?  I pretty much doubt that, given that the image format is 
> explicitely restricted to a maximum of 2 GB.  So, the small code model 
is 
> completely enough.

That is true just for executables. But shared objects (DLL's) can be 
placed far behind this boundary. Reasoned by the RVA relocation, which is 
64-bit, it is necessary for sure. As rev. see the msvcrt.dll, where it's 
base loading address is placed.

Cheers,
i.A. Kai Tietz



More information about the Gcc-patches mailing list