This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Updated version of x86_64-pc-mingw32 support of gcc.
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: bonzini at gnu dot org, gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>
- Date: Mon, 19 Mar 2007 17:26:35 +0100
- Subject: Re: PATCH: Updated version of x86_64-pc-mingw32 support of gcc.
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