[all-commits] [llvm/llvm-project] aa6100: [llvm-objdump][macho] Add support for ObjC relativ...
alx32 via All-commits
all-commits at lists.llvm.org
Thu Mar 14 13:41:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa6100643c2c8f9a1b06ba557b68b0fba477e3c7
https://github.com/llvm/llvm-project/commit/aa6100643c2c8f9a1b06ba557b68b0fba477e3c7
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2024-03-14 (Thu, 14 Mar 2024)
Changed paths:
A llvm/test/tools/llvm-objdump/MachO/AArch64/Inputs/rel-method-lists-arm64.dylib
A llvm/test/tools/llvm-objdump/MachO/AArch64/Inputs/rel-method-lists-arm64_32.dylib
A llvm/test/tools/llvm-objdump/MachO/AArch64/macho-relative-method-lists.test
M llvm/tools/llvm-objdump/MachODump.cpp
Log Message:
-----------
[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:
![objdump_vs_otool](https://github.com/llvm/llvm-project/assets/103613512/4fc04228-ed35-473d-b633-364402411b91)
---------
Co-authored-by: Alex B <alexborcan at meta.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list