2012/6/27 Richard Henderson <r...@redhat.com>: > 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?
Correct. > 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? Sounds interesting from perspective of startup-speed. I wouldn't assume that it has much effect on memory-saving. But to check this, is subject of different patch, but II will give it a try. > r~ Kai