Discard zero address range eh_frame FDEs

Alan Modra amodra@gmail.com
Sun Oct 12 11:39:00 GMT 2014


On Thu, Oct 09, 2014 at 09:23:23AM +0200, Matthias Klose wrote:
> Am 04.10.2014 um 15:25 schrieb Alan Modra:
> > Zero address range FDEs are useless because they can't match any
> > address.  In fact, worse than useless because the .eh_frame_hdr lookup
> > table matching addresses to FDEs does not contain information about
> > the FDE range.  The table is sorted by address;  Range is inferred by
> > the address delta from one entry to the next.  So if a zero address
> > range FDE is followed by a normal non-zero range FDE for the same
> > address, everything is good.  The zero address range FDE will be seen
> > as having zero range, and the normal FDE an address range up to the
> > next FDE.  However, the qsort could just as easily sort the FDEs in
> > the other order, in which case the normal FDE would be seen to have a
> > zero range.
> 
> this still leaves some link failures for more unusual packages, where ld -r is
> used to create intermediate files.
> Filed https://sourceware.org/bugzilla/show_bug.cgi?id=17467 and put together a
> tarball with the object files for x86_64.

This doesn't look easy to fix.  I'm very tempted to say that people
who use ld -r to package object files deserve to suffer for their
misguided actions..  The underlying problem, with the potential for
nasty exception handling bugs at runtime, has been there since
https://sourceware.org/ml/binutils/2003-02/msg00471.html 

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list