Why does LC_SYMTAB have invalid stroff/strsize but only for some loaded images?
问题 I wrote the below program to iterate over all images in memory and dump their string tables. #include <mach-o/dyld.h> #include <stdio.h> #include <string.h> int main(int argc, char** argv) { uint32_t count = _dyld_image_count(); for (uint32_t i = 0 ; i < count ; i++) { const char* imageName = _dyld_get_image_name(i); printf("IMAGE[%u]=%s\n", i, imageName); const struct mach_header* header = _dyld_get_image_header(i); if (header->magic != MH_MAGIC_64) continue; struct mach_header_64* header64