make .eh_frame read-only
Hans-Peter Nilsson
hp@bitrange.com
Fri Jun 6 13:09:00 GMT 2003
On Thu, 5 Jun 2003, Richard Henderson wrote:
> On Thu, Jun 05, 2003 at 10:45:11PM -0400, Hans-Peter Nilsson wrote:
> > Unless "I have no ideas what I'm talking about", on some
> > architectures there'll still have to be run-time relocations for
> > DSO:s there, so forcing read-only for all would be wrong; that'd
> > force DT_TEXTREL for those targets.
>
> Nope. Elsewhere I unconditionally force pc-relative relocations:
>
> out_one (DW_EH_PE_pcrel | DW_EH_PE_sdata4);
Right; my point was that .eh_frame also contains output from
gcc, and cfi_finish is called unconditionally. But I see that
cfi_finish returns early if no CFI directives were used.
So, I guess targets that want to use the new CFI directives
should only emit pc-relative relocs in their other (i.e. GCC)
.eh_frame output.
Anyway, none of this seem to matter, since the writable bit is
or:ed with a section merge and (regarding flags setting)
.eh_frame in elf.sc is still put after data with no target
override. Never mind.
brgds, H-P
More information about the Binutils
mailing list