Skip to content
Commit c98de138 authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

ELF: Set FDE count in .eh_frame_hdr correctly.

It is possible to have FDEs with duplicate PCs if ICF was able to merge
functions with FDEs, or if the input files for some reason contained duplicate
FDEs.  We previously weren't handling this correctly when producing the
contents of the .eh_frame_hdr section; we were dropping entries and leaving
null entries at the end of the section, which confused consumers of unwind
data, such as the backtrace() function.

Fix the bug by setting the FDE count to the number of FDEs actually emitted
into .eh_frame_hdr, rather than the number of FDEs in .eh_frame.

Differential Revision: http://reviews.llvm.org/D18911

llvm-svn: 265957
parent 7cf73ec4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment