[llvm-objcopy][MachO] Ignore LC_LINKER_OPTION when redefining symbols
authorKeith Smiley <keithbsmiley@gmail.com>
Sat, 29 Jan 2022 04:06:51 +0000 (20:06 -0800)
committerKeith Smiley <keithbsmiley@gmail.com>
Mon, 31 Jan 2022 23:49:06 +0000 (15:49 -0800)
commit7a836ba3c5f2bdbd8b802a205f21b477ef91963d
tree5b568f3aa437ace00fbfe683581d471675f764c4
parent2d5f857a1eaf5f7a806d12953c79b96ed8952da8
[llvm-objcopy][MachO] Ignore LC_LINKER_OPTION when redefining symbols

Previously you would get this error:

```
error: unsupported load command (cmd=0x2d)
```

If the binary you were redefining the symbols of contained a
LC_LINKER_OPTION load command. This command does not need to be changed
when redefining symbols so we can ignore it like many others.

Differential Revision: https://reviews.llvm.org/D118526
llvm/test/tools/llvm-objcopy/MachO/redefine-symbol.s
llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp