1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[llvm-objcopy][MachO] Copy LC_LINKER_OPTIMIZATION_HINT

This fixes `error: unsupported load command (cmd=0x2e)`
This commit is contained in:
Fangrui Song 2021-06-16 12:09:49 -07:00
parent 45a66978f9
commit 294d3d8800
2 changed files with 5 additions and 0 deletions

View File

@ -169,6 +169,10 @@ LoadCommands:
- cmd: LC_SOURCE_VERSION
cmdsize: 16
version: 0
- cmd: LC_LINKER_OPTIMIZATION_HINT
cmdsize: 16
dataoff: 0
datasize: 0
- cmd: LC_MAIN
cmdsize: 24
entryoff: 3984

View File

@ -356,6 +356,7 @@ Error MachOLayoutBuilder::layoutTail(uint64_t Offset) {
// LC_ENCRYPT_INFO/LC_ENCRYPTION_INFO_64 need to be adjusted.
case MachO::LC_ENCRYPTION_INFO:
case MachO::LC_ENCRYPTION_INFO_64:
case MachO::LC_LINKER_OPTIMIZATION_HINT:
case MachO::LC_LOAD_DYLINKER:
case MachO::LC_MAIN:
case MachO::LC_RPATH: