Index: /trunk/include/iprt/formats/mach-o.h
===================================================================
--- /trunk/include/iprt/formats/mach-o.h	(revision 85338)
+++ /trunk/include/iprt/formats/mach-o.h	(revision 85339)
@@ -365,4 +365,5 @@
 #define SG_NORELOC          UINT32_C(0x00000004)
 #define SG_PROTECTED_VERSION_1 UINT32_C(0x00000008)
+#define SG_READ_ONLY        UINT32_C(0x00000010) /**< Make it read-only after applying fixups. @since 10.14 */
 
 /* maxprot/initprot */
Index: /trunk/src/VBox/Runtime/common/ldr/ldrMachO.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/ldr/ldrMachO.cpp	(revision 85338)
+++ /trunk/src/VBox/Runtime/common/ldr/ldrMachO.cpp	(revision 85339)
@@ -102,4 +102,14 @@
 #endif
 
+/** @def RTLDRMODMACHO_CHECK_MSG_RETURN
+ * Checks that an expression is true and return if it isn't.
+ * This is a debug aid.
+ */
+#ifdef RTLDRMODMACHO_STRICT2
+# define RTLDRMODMACHO_CHECK_MSG_RETURN(expr, msgargs, rc)  AssertMsgReturn(expr, msgargs, rc)
+#else
+# define RTLDRMODMACHO_CHECK_MSG_RETURN(expr, msgargs, rc)  do { if (RT_LIKELY(expr)) {/* likely */ } else return (rc); } while (0)
+#endif
+
 /** @def RTLDRMODMACHO_CHECK_RETURN
  * Checks that an expression is true and return if it isn't.
@@ -710,6 +720,7 @@
                 RTLDRMODMACHO_CHECK_RETURN(!(~pSrcSeg->maxprot & pSrcSeg->initprot), \
                                           VERR_LDRMACHO_BAD_LOAD_COMMAND); \
-                RTLDRMODMACHO_CHECK_RETURN(!(pSrcSeg->flags & ~(SG_HIGHVM | SG_FVMLIB | SG_NORELOC | SG_PROTECTED_VERSION_1)), \
-                                          VERR_LDRMACHO_BAD_LOAD_COMMAND); \
+                RTLDRMODMACHO_CHECK_MSG_RETURN(!(pSrcSeg->flags & ~(SG_HIGHVM | SG_FVMLIB | SG_NORELOC | SG_PROTECTED_VERSION_1 | SG_READ_ONLY)), \
+                                               ("flags=%#x %s\n", pSrcSeg->flags, pSrcSeg->segname), \
+                                               VERR_LDRMACHO_BAD_LOAD_COMMAND); \
                 RTLDRMODMACHO_CHECK_RETURN(   pSrcSeg->nsects * sizeof(section_##a_cBits##_t) \
                                           <= u.pLoadCmd->cmdsize - sizeof(segment_command_##a_cBits##_t), \
