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

Michael Matz
Mon Mar 19 17:25:00 GMT 2007


On Mon, 19 Mar 2007, Kai Tietz wrote:

> See 
> 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.


More information about the Gcc-patches mailing list