[PATCH] D18911: ELF: Emit .eh_frame_hdr entries for FDEs with duplicate PCs.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 9 12:24:57 PDT 2016


On Sat, Apr 9, 2016 at 5:33 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

>
> On Apr 8, 2016 10:43 PM, "Peter Collingbourne" <peter at pcc.me.uk> wrote:
> >
> > pcc added a comment.
> >
> > It seems feasible, I'll see if I can do it. In the meantime, this fixes
> the issue with backtrace(), and also matches gold's behavior, so maybe we
> can land this as a first step with a FIXME.
>
> Please don't. Just subtracting one each time from fde_count should be easy.
>
> Matching gold's behavior sounds like just cargo cult in this case.
>
Okay, fair enough. I've uploaded a new patch that just sets fde_count to
the number of FDEs actually emitted.

> > I was also thinking about cases where the unwind info for functions with
> identical bodies was semantically different. For example, I suppose you
> might be able to have functions with identical bodies but different
> personality functions. If that's possible, I suppose we may need to inhibit
> ICF in such cases and do something completely different here.
> >
>
> If you avoid ICF you would not need to do anything in here, no?
>
Maybe. I was thinking that whatever data structure we build in ICF for the
FDEs could be shared between ICF and the .eh_frame{,hdr} writer code. But
anyway, that probably doesn't matter for now.

-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160409/f1f9b662/attachment.html>


More information about the llvm-commits mailing list