<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/61019>61019</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            objdump `-M no-aliases` doesn't work with `--macho`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          verhovsky
      </td>
    </tr>
</table>

<pre>
    Compile this trivial AArch64 program

```asm
.global _main
.align 2

_main:  MOV     W1, W2
```

like this

```sh
as main.s -o main.o
ld -o main -lSystem -syslibroot `xcrun -sdk macosx --show-sdk-path` main.o
```

then run objdump on it:

```
$ objdump -d main

main:   file format mach-o arm64

Disassembly of section __TEXT,__text:

0000000100003fb4 <_main>:
100003fb4: e1 03 02 2a  mov     w1, w2
$ objdump -d --macho main
main:
(__TEXT,__text) section
_main:
100003fb4:      e1 03 02 2a     mov     w1, w2
$ objdump -d -M no-aliases main

main:   file format mach-o arm64

Disassembly of section __TEXT,__text:

0000000100003fb4 <_main>:
100003fb4: e1 03 02 2a  orr     w1, wzr, w2
$ objdump -d --macho -M no-aliases main
main:
(__TEXT,__text) section
_main:
100003fb4:      e1 03 02 2a     mov     w1, w2
```

The last command (`objdump -d --macho -M no-aliases main`) outputs "mov" instead of "orr".

I'm on an M1 Macbook Air, macOS 13.2.1, Xcode version 14.1 (14B47b)

```
$ as --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ objdump --version
Apple LLVM version 14.0.0 (clang-1400.0.29.202)
 Optimized build.
  Default target: arm64-apple-darwin22.3.0
  Host CPU: apple-a12
[...]
```

See https://github.com/below/HelloSilicon/issues/43 for details.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJz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