[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 28 14:46:04 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D44494#1050803, @mstorsjo wrote:

> In https://reviews.llvm.org/D44494#1050797, @mstorsjo wrote:
>
> > This else clause isn't about `.eh_frame` vs `.eh_frame_hdr`, but about registering a single FDE (which libunwind's `__register_frame` currently does) vs registering a full `.eh_frame` section (which libgcc's `__register_frame` does).
>
>
> However, this function actually just is `_unw_add_dynamic_fde`, while `__register_frame` in `UnwindLevel1-gcc-ext.c` just calls this function. So we should probably check there instead, whether it's an FDE (which libgcc doesn't support via that entry point) or a full `.eh_frame` section.


In this case, it triggers the "FDE is really a CIE" case in decodeFDE, so we could do a quick check in `__register_frame` and see if it is a CIE or an FDE, and then call the right underlying functions based on that, instead of adding it in the error handling else statement like this.


https://reviews.llvm.org/D44494





More information about the cfe-commits mailing list