[patch] allow suppression of fde encoding warning
Sandra Loosemore
sandra@codesourcery.com
Tue Jan 22 23:29:00 GMT 2013
On 01/22/2013 12:40 PM, Richard Sandiford wrote:
> FWIW: MIPS can't represent a PC-relative offset in relocatable objects
> either, but elf-eh-frame.c tries pretty hard to convert absolute addresses
> into PC-relative ones. This is enough for --eh-frame-hdr to work correctly
> (AFAIK) on mips*-linux-gnu.
>
> I'd be interested to know why that code isn't kicking in for Nios II.
> Maybe a simple extension would fix it, or maybe not :-) The GCC backend
> needs a definition like this (from MIPS) for the conversion to work:
>
> [snip]
> #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
> (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_absptr)
>
> As the comment says, having PC-relative encodings is useful not only
> for the .eh_frame_hdr optimisation (which can be pretty important on its own),
> but because it allows .eh_frame to go in the text rather than data segment.
Hmmm. I tried this, and it does not help -- in fact, it makes things
worse, as I'm now getting 3 of the bogus warnings from my test case
where before than was only 1. :-(
-Sandra the ready-to-jump-off-a-tall-building
More information about the Binutils
mailing list