This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]