This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Should MIPS .eh_frame be writable?
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 08 Sep 2009 19:49:30 +0100
- Subject: Re: Should MIPS .eh_frame be writable?
- References: <4AA66F4D.2040001@codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
> On MIPS GNU/Linux, it appears that GAS marks .eh_frame as read-only.
>
> However, the MIPS32 relocation against the personality routine is not
> optimized away (as I'm given to understand it is on some other
> platforms), and so .eh_frame does end up needing run-time relocation.
> That results in DT_TEXTREL being set on shared objects, and undesirable
> relocations at run-time. (In fact, the uClibc loader -- at least older
> versions -- don't support relocations against the text section at all.)
>
> The obvious thing seems to be to set DWARF2_EH_FRAME_READ_ONLY to 0 (it
> has the non-conservative default of 1) in tc-mips.h. Is that the right
> approach?
The relocations are only for the personality routines, right?
If so, then I think we should simply use an indirect encoding.
I'll do a (gcc) patch.
Richard