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: Michael Matz <matz at suse dot de>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- 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:57:49 +0100 (CET)
- Subject: Re: PATCH: Updated version of x86_64-pc-mingw32 support of gcc.
- References: <OFF959A9CF.BCDF9D6F-ONC12572A3.005BBB62-C12572A3.005C1680@onevision.de>
Hi,
On Mon, 19 Mar 2007, Kai Tietz wrote:
> See
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/introducing_64_bit_windows.asp
> for more information. If gcc would produce rip code (really position
> idepent code), than may the relocation issue could be ignored. But gcc
> doesn't do that, eg. for string-constants on passing them to functions
> as e.g. printf.
It does, when you request it (-fPIC, or -fPIE for executables). If that
makes you not need the large model, then you really want to force that.
The large model comes at a fairly high cost.
> An absolute reference is getting produced by pushing its address, which
> leads for PE to an RVA relocation.
Which is okay, if the base address needs less than 2GB, if it might be
larger then you'll probably want to generate PI[CE] code, instead of using
the large model.
Ciao,
Michael.