rust-macho icon indicating copy to clipboard operation
rust-macho copied to clipboard

Support threaded binding opcodes

Open PaulDance opened this issue 2 years ago • 0 comments

As one can see in loader.h, some additional binding opcodes are defined:

#define BIND_OPCODE_THREADED                                    0xD0
#define BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB 0x00
#define BIND_SUBOPCODE_THREADED_APPLY                            0x01

However, these are not found in this project's consts.rs:

https://github.com/flier/rust-macho/blob/4bf5fb1f2a0ab02dc09e7f51a95a46e780b1354c/src/consts.rs#L844-L855

and are therefore not handled in opcode.rs, which means that if a file contains some opcode of 0xd0 or 0xf0, then the parsing will fail on:

https://github.com/flier/rust-macho/blob/4bf5fb1f2a0ab02dc09e7f51a95a46e780b1354c/src/opcode.rs#L148-L152

while it should not. There should instead be some support for these cases.

PaulDance avatar Nov 02 '23 20:11 PaulDance