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

Daniel Rodríguez Troitiño via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 11:57:06 PDT 2024


================
@@ -3673,6 +3683,12 @@ struct method_list32_t {
   /* struct method32_t first;  These structures follow inline */
 };
 
+struct method_list_delta_t {
+  uint32_t entsize;
+  uint32_t count;
+  /* struct method_delta_t first;  These structures follow inline */
+};
+
----------------
drodriguez wrote:

In my opinion, I think `method_list_delta_t` is not necessary, and might be confusing. Since `print_method_list_delta_t` is the first to run, one might have the message about `method_delta_t extends past the end of the section` before it has been confirmed it was a `method_delta_t`.

I think it might be better to let the first block of `print_method_list32_t` happen (old lines 4538 to 4554) until one can check against `ML_HAS_DELTAS`, and then diverge from there (passing `ml` to the child methods).

Same change in `print_method_list64_t`. One can go down to line 4463 before diverging to the special case for delta handling.

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


More information about the llvm-commits mailing list