binutils Newspaper
JUNE 15, 2026
binutils Proposed

Fixes for Mach-O assembler on i386-darwin proposed

Alan Modra proposes a patch series to fix issues in the Mach-O assembler for i386-darwin, the last remaining Mach-O target supported by gas.

Alan Modra is submitting a patch series to address issues in the Mach-O assembler specifically for the i386-darwin target. This target is the only remaining Mach-O target supported by gas. The changes fix testsuite regressions caused by commit cc28c46227cd and other problems related to symbol reduction and DWARF generation. Iain Sandoe has offered to test the patches.

In the Thread 3 participants
  1. Alan Modra proposer

    Proposes a patch series to fix issues in the Mach-O assembler for the i386-darwin target, noting uncertainty about the last patch's correctness.

    “ix86-darwin is the only remaining macho target supported by gas. I'm not sure how much it is used nowadays, and judging by the number of x86 tests and mach-o tests that fail, it seems no one is actively maintaining the code. So it's quite possible this series of patches I made fixing some issues was wasted time.”
  2. Iain Sandoe reviewer

    Offers to test the patch series.

    “I will try to look at and test this - over the next week or two - is there a branch somewhere I can checkout?”
  3. Alan Modra contributor

    Provides a branch for Iain to checkout the patches.

    “Thanks! I hadn't put them on a branch, but they are now on binutils-gdb users/amodra/macho.”

Technical Tradeoffs

  • The last patch may have correctness issues related to ignoring subsections when processing debug info.
  • Not reducing symbols results in a large number of symbols, some with weird internal gas names.

In Details

This series addresses issues in the Mach-O backend of gas, the GNU assembler, specifically for the i386-darwin target. The patches fix regressions and problems related to symbol reduction and DWARF generation. Mach-O is the file format used by macOS, and this support is in gas to assemble code for older macOS systems.

For Context

The GNU Assembler (gas) translates human-readable assembly code into machine code that a computer can execute. This discussion concerns the Mach-O format, which is used by macOS operating systems. The patches aim to fix issues in the assembler's support for generating Mach-O binaries for older i386-based macOS systems, ensuring correct code generation and debugging information.

Filed Under: binutilsgasassemblermach-oi386-darwin