I'm trying to analyze and get the full list of selectors and their related classes in objective-c by first reading the
__objc_classlist section and getting pointers to the struct
objc_class list to traverse my way to
class_ro_t struct from the
bits member and then get to the the struct
method_list_t and then get all the methods implementations and selectors.
I read my macho file and set the cursor to the section's
addr member and then try to read pointer sized values, problem is I'm getting completely different values from what I inspect in ghidra for example where I see another pointer value that leads to an actualyl
I validated my code with just printing the bytes at this place:
dd bs=1 "skip=2240984" "count=$((2240992 - 2240984))" if=framework | xxd
2240984 is the start address of the
__objc_classlist section and I observe same pointer values as in my code, so I wonder what I am doing wrong and why in ghidra I see different valid pointer values?