[libunwind] 4cd0937 - [libunwind] Remove compatibility support for macOS 10.6
Steven Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 17 14:10:09 PDT 2020
Author: Steven Wu
Date: 2020-08-17T14:09:03-07:00
New Revision: 4cd09374cdb163573007ccb402f5ba8970eb6134
URL: https://github.com/llvm/llvm-project/commit/4cd09374cdb163573007ccb402f5ba8970eb6134
DIFF: https://github.com/llvm/llvm-project/commit/4cd09374cdb163573007ccb402f5ba8970eb6134.diff
LOG: [libunwind] Remove compatibility support for macOS 10.6
Remove `_dyld_find_unwind_sections` implementation for macOS that is
10.6 or previous. 10.6 is no longer supported for TOT libunwind after
removing its libkeymgr dependency.
Reviewed By: mstorsjo, pete, #libunwind
Differential Revision: https://reviews.llvm.org/D86104
Added:
Modified:
libunwind/src/AddressSpace.hpp
Removed:
################################################################################
diff --git a/libunwind/src/AddressSpace.hpp b/libunwind/src/AddressSpace.hpp
index 3d1e810f43c0..78d2dd110865 100644
--- a/libunwind/src/AddressSpace.hpp
+++ b/libunwind/src/AddressSpace.hpp
@@ -55,43 +55,9 @@ struct EHABIIndexEntry {
const void* compact_unwind_section;
uintptr_t compact_unwind_section_length;
};
- #if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \
- && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)) \
- || defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
- // In 10.7.0 or later, libSystem.dylib implements this function.
- extern "C" bool _dyld_find_unwind_sections(void *, dyld_unwind_sections *);
- #else
- // In 10.6.x and earlier, we need to implement this functionality. Note
- // that this requires a newer version of libmacho (from cctools) than is
- // present in libSystem on 10.6.x (for getsectiondata).
- static inline bool _dyld_find_unwind_sections(void* addr,
- dyld_unwind_sections* info) {
- // Find mach-o image containing address.
- Dl_info dlinfo;
- if (!dladdr(addr, &dlinfo))
- return false;
-#if __LP64__
- const struct mach_header_64 *mh = (const struct mach_header_64 *)dlinfo.dli_fbase;
-#else
- const struct mach_header *mh = (const struct mach_header *)dlinfo.dli_fbase;
-#endif
-
- // Initialize the return struct
- info->mh = (const struct mach_header *)mh;
- info->dwarf_section = getsectiondata(mh, "__TEXT", "__eh_frame", &info->dwarf_section_length);
- info->compact_unwind_section = getsectiondata(mh, "__TEXT", "__unwind_info", &info->compact_unwind_section_length);
-
- if (!info->dwarf_section) {
- info->dwarf_section_length = 0;
- }
- if (!info->compact_unwind_section) {
- info->compact_unwind_section_length = 0;
- }
-
- return true;
- }
- #endif
+ // In 10.7.0 or later, libSystem.dylib implements this function.
+ extern "C" bool _dyld_find_unwind_sections(void *, dyld_unwind_sections *);
#elif defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) && defined(_LIBUNWIND_IS_BAREMETAL)
More information about the cfe-commits
mailing list