================
@@ -424,7 +424,13 @@ static bool checkAddrInSegment(const Elf_Phdr *phdr,
size_t image_base,
static bool checkForUnwindInfoSegment(const Elf_Phdr *phdr, size_t image_base,
dl_iterate_cb_data *cbdata) {
#if defined(_LIBUNWIND_SUPPORT_DWARF_INDEX)
+#if defined(PT_SUNW_EH_FRAME) && defined(PT_SUNW_UNWIND)
+ // illumos/Solaris use PT_SUNW_EH_FRAME and PT_SUNW_UNWIND instead of
PT_GNU_EH_FRAME.
+ // FreeBSD defines PT_SUNW_UNWIND but not PT_SUNW_EH_FRAME, so check for
both.
----------------
MaskRay wrote:
I believe major BSD, including FreeBSD, all use `PT_GNU_EH_FRAME`. The comment
should be removed.
I think you just need to check one constant. PT_SUNW_EH_FRAME
(PT_SUNW_UNWIND, if defined, has the same value)
https://github.com/llvm/llvm-project/pull/176988
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits