- if (noffset != _not(uintptr_t))
- printf("%s\n", &*framework.GetPointer<char>(noffset));
-
- _foreach (load_command, framework.GetLoadCommands()) {
- uint32_t cmd(framework.Swap((*load_command)->cmd));
-
- if (flag_R && cmd == LC_REEXPORT_DYLIB)
- (*load_command)->cmd = framework.Swap(LC_LOAD_DYLIB);
- else if (cmd == LC_CODE_SIGNATURE)
- signature = reinterpret_cast<struct linkedit_data_command *>(*load_command);
- else if (cmd == LC_UUID) {
- volatile struct uuid_command *uuid_command(reinterpret_cast<struct uuid_command *>(*load_command));
-
- if (flag_u) {
- printf("uuid%zu=%.2x%.2x%.2x%.2x-%.2x%.2x-%.2x%.2x-%.2x%.2x-%.2x%.2x%.2x%.2x%.2x%.2x\n", filei,
- uuid_command->uuid[ 0], uuid_command->uuid[ 1], uuid_command->uuid[ 2], uuid_command->uuid[ 3],
- uuid_command->uuid[ 4], uuid_command->uuid[ 5], uuid_command->uuid[ 6], uuid_command->uuid[ 7],
- uuid_command->uuid[ 8], uuid_command->uuid[ 9], uuid_command->uuid[10], uuid_command->uuid[11],
- uuid_command->uuid[12], uuid_command->uuid[13], uuid_command->uuid[14], uuid_command->uuid[15]
- );
- }
- } else if (cmd == LC_ID_DYLIB) {
- volatile struct dylib_command *dylib_command(reinterpret_cast<struct dylib_command *>(*load_command));
+ if (noffset != _not(uintptr_t))
+ printf("%s\n", &*mach_header.GetPointer<char>(noffset));
+
+ _foreach (load_command, mach_header.GetLoadCommands()) {
+ uint32_t cmd(mach_header.Swap(load_command->cmd));
+
+ if (flag_R && cmd == LC_REEXPORT_DYLIB)
+ load_command->cmd = mach_header.Swap(LC_LOAD_DYLIB);
+ else if (cmd == LC_CODE_SIGNATURE)
+ signature = reinterpret_cast<struct linkedit_data_command *>(load_command);
+ else if (cmd == LC_UUID) {
+ volatile struct uuid_command *uuid_command(reinterpret_cast<struct uuid_command *>(load_command));
+
+ if (flag_u) {
+ printf("uuid%zu=%.2x%.2x%.2x%.2x-%.2x%.2x-%.2x%.2x-%.2x%.2x-%.2x%.2x%.2x%.2x%.2x%.2x\n", filei,
+ uuid_command->uuid[ 0], uuid_command->uuid[ 1], uuid_command->uuid[ 2], uuid_command->uuid[ 3],
+ uuid_command->uuid[ 4], uuid_command->uuid[ 5], uuid_command->uuid[ 6], uuid_command->uuid[ 7],
+ uuid_command->uuid[ 8], uuid_command->uuid[ 9], uuid_command->uuid[10], uuid_command->uuid[11],
+ uuid_command->uuid[12], uuid_command->uuid[13], uuid_command->uuid[14], uuid_command->uuid[15]
+ );
+ }
+ } else if (cmd == LC_ID_DYLIB) {
+ volatile struct dylib_command *dylib_command(reinterpret_cast<struct dylib_command *>(load_command));