PATCH: PR ld/5149: Set PF_X for PT_GNU_RELRO segment only when needed

Alan Modra amodra@bigpond.net.au
Wed Oct 24 08:42:00 GMT 2007


On Mon, Oct 22, 2007 at 03:31:09PM -0700, H.J. Lu wrote:
> 	PR ld/5149
> 	* elf.c (assign_file_positions_for_non_load_sections): Set
> 	PF_X for PT_GNU_RELRO segment only if a section has
> 	SHF_EXECINSTR.

I took a look at what glibc ld.so does with PT_GNU_RELRO and it
appears that p_flags are completely ignored.  The mprotect call
always uses PROT_READ.  So I don't really see the point of this
patch.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list