This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: PR ld/5149: Set PF_X for PT_GNU_RELRO segment only when needed


On Wed, Oct 24, 2007 at 03:25:59PM +0930, Alan Modra wrote:
> 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.
> 

I don't think we should use glibc as spec here. If it is case,
why not just set it to PROT_READ?

The question is if PT_GNU_RELRO can have the PF_X bit set and
what it means. Roland, do you have comments?


H.J.


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