summaryrefslogtreecommitdiff
path: root/binutils/od-macho.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2012-11-14 11:03:26 +0000
committerTristan Gingold <gingold@adacore.com>2012-11-14 11:03:26 +0000
commita74b8b7f46082e3fedaf9f16a70298b8e5333c47 (patch)
tree775c9ab8e180ae8f3630ad0b1fe4bd0daad42c42 /binutils/od-macho.c
parent230e14c0ac35784b507ed2a07056007a21613dbb (diff)
downloadbinutils-redhat-a74b8b7f46082e3fedaf9f16a70298b8e5333c47.tar.gz
bfd/
2012-11-14 Tristan Gingold <gingold@adacore.com> * mach-o.c (bfd_mach_o_read_main) (bfd_mach_o_read_source_version): New functions. (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DATA_IN_CODE, BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS, BFD_MACH_O_LC_MAIN, BFD_MACH_O_LC_SOURCE_VERSION. * mach-o.h (bfd_mach_o_main_command) (bfd_mach_o_source_version_command): New types. (bfd_mach_o_load_command): Add fields for these new types. binutils/ 2012-11-14 Tristan Gingold <gingold@adacore.com> * od-macho.c (bfd_mach_o_load_command_name): Add new definitions. (dump_load_command): Handle BFD_MACH_O_LC_SOURCE_VERSION and BFD_MACH_O_LC_MAIN.
Diffstat (limited to 'binutils/od-macho.c')
-rw-r--r--binutils/od-macho.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/binutils/od-macho.c b/binutils/od-macho.c
index ca1dba73b4..e62f137022 100644
--- a/binutils/od-macho.c
+++ b/binutils/od-macho.c
@@ -182,6 +182,10 @@ static const bfd_mach_o_xlat_name bfd_mach_o_load_command_name[] =
{ "version_min_iphoneos", BFD_MACH_O_LC_VERSION_MIN_IPHONEOS},
{ "function_starts", BFD_MACH_O_LC_FUNCTION_STARTS},
{ "dyld_environment", BFD_MACH_O_LC_DYLD_ENVIRONMENT},
+ { "main", BFD_MACH_O_LC_MAIN},
+ { "data_in_code", BFD_MACH_O_LC_DATA_IN_CODE},
+ { "source_version", BFD_MACH_O_LC_SOURCE_VERSION},
+ { "dylib_code_sign_drs", BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS},
{ NULL, 0}
};
@@ -1036,6 +1040,27 @@ dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
printf (" %u.%u.%u\n", ver->rel, ver->maj, ver->min);
}
break;
+ case BFD_MACH_O_LC_SOURCE_VERSION:
+ {
+ bfd_mach_o_source_version_command *version =
+ &cmd->command.source_version;
+ printf ("\n"
+ " version a.b.c.d.e: %u.%u.%u.%u.%u\n",
+ version->a, version->b, version->c, version->d, version->e);
+ break;
+ }
+ case BFD_MACH_O_LC_MAIN:
+ {
+ bfd_mach_o_main_command *entry = &cmd->command.main;
+ printf ("\n"
+ " entry offset: ");
+ printf_vma (entry->entryoff);
+ printf ("\n"
+ " stack size: ");
+ printf_vma (entry->stacksize);
+ printf ("\n");
+ break;
+ }
default:
putchar ('\n');
printf (" offset: 0x%08lx\n", (unsigned long)cmd->offset);