This is the mail archive of the
mailing list for the GCC project.
Re: why isn't the .eh_frame section marked READONLY?
- To: Joe Buck <jbuck at synopsys dot com>, Jason Merrill <jason at cygnus dot com>
- Subject: Re: why isn't the .eh_frame section marked READONLY?
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 2 Jun 1998 19:08:25 -0700
- Cc: egcs at cygnus dot com
- References: <firstname.lastname@example.org> <199806021627.JAA17099@atrus.synopsys.com>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Tue, Jun 02, 1998 at 09:27:49AM -0700, Joe Buck wrote:
> As someone else asked: that explains why it is not readonly when -fPIC
> is provided. But why isn't it readonly if -fPIC is not provided? After
> all, in that same situation the text section is readonly even though it
> contains relocations.
Because in the -shared case, those relocations must be applied
at run time by ld.so.
If the section is marked read-only, this means that _DYNAMIC will
bear a DT_TEXTREL=1 note, which will require two calls to mprotect
to handle properly. In addition, it will dirty what would ordinarily
be read-only pages, instead of sharing those dirty pages with other
All in all, a lose.