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] allow suppression of fde encoding warning


Sandra Loosemore <sandra@codesourcery.com> writes:
> 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.  :-(

If you have time, it'd be interesting to know at which point
_bfd_elf_parse_eh_frame bails out.  The readelf -wf output
for that object would be useful too.

Richard


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