[llvm-objdump][macho] Add support for ObjC relative method lists (#84250)
For Mach-O, ld64 supports the `-fobjc-relative-method-lists` flag which changes the format in which method lists are generated. The format uses delta encoding vs the original direct-pointer encoding. This change adds support to `llvm-objdump` and `llvm-otool` for decoding/dumping of method lists in the delta format. Previously, if a binary with this information format was passed to the tooling, it would output invalid information, trying to parse the delta lists as pointer lists. After this change, the tooling will output correct information if a binary in this format is encountered. The output format is closest feasible match to XCode 15.1's otool output. Tests are included for both 32bit and 64bit binaries. The code style was matched as close as possible to existing implementation of parsing non-delta method lists. Diff between llvm-objdump and XCode 15.1 otool:  --------- Co-authored-by:Alex B <alexborcan@meta.com>
parent
8f0012d3
Please register or sign in to comment