[llvm] [llvm-objdump][macho] Add support for ObjC relative method lists (PR #84250)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 11:28:32 PDT 2024


================
@@ -4535,6 +4663,10 @@ static void print_method_list64_t(uint64_t p, struct DisassembleInfo *info,
 
 static void print_method_list32_t(uint64_t p, struct DisassembleInfo *info,
                                   const char *indent) {
+  // Try to parse it as a delta list. If successful, just return
+  if (print_method_list_delta_t(p, info, indent, /*pointerBits=*/32))
----------------
alx32 wrote:

In the 32b arch case, the delta method encoding does not enhance the size; in fact, it will likely increase it. In the scenario of a 32-bit architecture, the size of the method list remains unchanged. However, since the use of delta method lists necessitates selector references, this will increase the overall size compared to simply using 32-bit pointers. 

By default, XCode does not generate deltas method lists for 32-bit architectures, but it can be compelled to do so. 

XCode's objdump also accommodates this scenario, so to align with its behavior, we must also include this feature.

https://github.com/llvm/llvm-project/pull/84250


More information about the llvm-commits mailing list