That stops the user from partially parsing and totally modifying any mach-o binary from Big Sur with such error:
"Unsupported opcode: 0xd0"
To Reproduce
Steps to reproduce the behavior:
I suggest to run macho_reader console application from LIEF and point it to the /bin/ls
There will be several "Unsupported opcode: 0xd0" output strings in the end.
It is also reproduced with macho_builder.
Expected behavior
I'm expecting that the binary would be successfully parsed without any "Unsupported opcode" messages.
Environment (please complete the following information):
System and Version : macOS 10.16 Big Sur (the bug could be reproduced on any Big Sur release version)
Target format: Mach-O
LIEF commit version: latest master
Additional context
There are one new opcode and 2 subcodes for it introduced first in iOS SDK and later with Big Sur too.
Some opensource projects are already have partially or full support of such opcodes: https://github.com/DeVaukz/MachO-Kit
(I were able to correctly parse the /bin/ls from Big Sur with https://github.com/DeVaukz/MachO-Explorer linked against the MachO_Kit, there are some logic for such opcodes and subcodes)
Describe the bug
Currently, LIEF does not support the new opcodes introduced in macOS 10.16 Big Sur:
#define BIND_OPCODE_THREADED 0xD0
#define BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB 0x00
#define BIND_SUBOPCODE_THREADED_APPLY 0x01
from SDK/usr/include/mach-o/loader.h
(also see https://opensource.apple.com/source/dyld/dyld-635.2/src/dyldInitialization.cpp.auto.html)
That stops the user from partially parsing and totally modifying any mach-o binary from Big Sur with such error:
"Unsupported opcode: 0xd0"
To Reproduce
Steps to reproduce the behavior:
I suggest to run macho_reader console application from LIEF and point it to the /bin/ls
There will be several "Unsupported opcode: 0xd0" output strings in the end.
It is also reproduced with macho_builder.
Expected behavior
I'm expecting that the binary would be successfully parsed without any "Unsupported opcode" messages.
Environment (please complete the following information):
Additional context
There are one new opcode and 2 subcodes for it introduced first in iOS SDK and later with Big Sur too.
Some opensource projects are already have partially or full support of such opcodes:
https://github.com/DeVaukz/MachO-Kit
(I were able to correctly parse the /bin/ls from Big Sur with https://github.com/DeVaukz/MachO-Explorer linked against the MachO_Kit, there are some logic for such opcodes and subcodes)
also radare2 has some support: radareorg/radare2@0b91114
some info is here too (search the "0xd"): http://www.newosxbook.com/articles/DYLD.html
The text was updated successfully, but these errors were encountered: