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 i386]: always allow for pe-coff that relocations can be put into readonly memory


On 06/27/2012 12:47 PM, Kai Tietz wrote:
> 2012-06-27  Kai Tietz
> 
> 	* config/i386/winnt.c (i386_pe_reloc_rw_mask): New function.
> 	* config/i386/i386-protos.h (i386_pe_reloc_rw_mask): Add
> 	prototype.
> 	* config/i386/cygming.h (TARGET_ASM_RELOC_RW_MASK): Define
> 	as i386_pe_reloc_rw_mask.
> 
> Tested for i686-pc-cygwin, i686-w64-mingw32, and x86_64-w64-mingw32.
> Ok for apply?

Plausible.

I suppose this gets handled by the windows loader similar to how
the .data.ro sections get handled by an elf loader with -z relro?
I.e. relocations applied then the page protections reapplied?

Would it be of any use to introduce an .rdata$N section (equivalent
to .data.ro) so that most of the runtime relocations are adjacent,
and more of the executable image is sharable?


r~


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