[llvm] [dsymutil] Add new argument allow_invalid_macho (PR #173503)

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 5 11:04:49 PST 2026


================
@@ -108,6 +108,13 @@ def fat64: F<"fat64">,
 def update: F<"update">,
   HelpText<"Updates existing dSYM files to contain the latest accelerator tables and other DWARF optimizations.">,
   Group<grp_general>;
+
+def allow_slice_section_header_offset_overflow : F<"allow-slice-section-header-offset-overflow">,
+  HelpText<"Allow emitting Mach-O where, within a single slice, section header offsets (section.offset, 32-bit) exceed the 4GB limit (non-standard). "
+           "This option overrides dsymutil's per-slice 4GB check when writing section headers. "
+           "Use with caution: some tools may not be able to read the output.">,
+  Group<grp_general>;
+
 def: Flag<["-"], "u">,
   Alias<update>,
   HelpText<"Alias for --update">,
----------------
JDevlieghere wrote:

How about: 
> Allow emitting a section offset (32-bit) that, when applied, would exceed the Mach-O 4GB limit. This leverages the fact that the offset can be computed as a 64-bit value if the sections are ordered (always the case for dsymutil). Note that this generates an invalid Mach-O and requires explicit support by the tools that will need to consume it. 

https://github.com/llvm/llvm-project/pull/173503


More information about the llvm-commits mailing list