]> granicus.if.org Git - llvm/commit
[MC] Sort FDEs by the associated CIE before emitting them.
authorEli Friedman <efriedma@quicinc.com>
Thu, 14 Mar 2019 23:08:19 +0000 (23:08 +0000)
committerEli Friedman <efriedma@quicinc.com>
Thu, 14 Mar 2019 23:08:19 +0000 (23:08 +0000)
commita092a834c4ce9e7f3e31fbefb0d7bbaef033e275
treee1a593423947f534312f93577c8ca406c2656c93
parentd8706fcd747d2129b2c00045dd8d8191b115f26a
[MC] Sort FDEs by the associated CIE before emitting them.

This isn't necessary according to the DWARF standard, but it matches the
.eh_frame sections emitted by other tools in practice, and the Android
libunwindstack rejects .eh_frame sections where an FDE refers to a CIE
other than the closest previous CIE. So match the other tools and also
sort accordingly.

I consider this a bug in libunwindstack, but it's easy enough to emit
a compatible .eh_frame section for compatibility with installed
operating systems.

Differential Revision: https://reviews.llvm.org/D58266

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356216 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCDwarf.cpp
test/CodeGen/AArch64/arm64-big-endian-eh.ll
test/MC/ELF/cfi-signal-frame.s
test/MC/ELF/cfi.s