aboutsummaryrefslogtreecommitdiff
path: root/binutils/od-macho.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2012-11-14 11:03:27 +0000
committerTristan Gingold <gingold@adacore.com>2012-11-14 11:03:27 +0000
commit1778ad74b30a4873b8288ef88918677d333164e2 (patch)
tree8a0e660bb42092310173638f5c268dab57153bb7 /binutils/od-macho.c
parent91cb77818bed6466a0c4097025a43d99266f07bb (diff)
downloadgdb-1778ad74b30a4873b8288ef88918677d333164e2.zip
gdb-1778ad74b30a4873b8288ef88918677d333164e2.tar.gz
gdb-1778ad74b30a4873b8288ef88918677d333164e2.tar.bz2
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 ca1dba7..e62f137 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);