aboutsummaryrefslogtreecommitdiff
path: root/binutils
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
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')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/od-macho.c25
2 files changed, 31 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index c70e4b3..23f8409 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2012-11-13 Maciej W. Rozycki <macro@codesourcery.com>
* readelf.c (get_machine_flags) <EM_MIPS, EM_MIPS_RS3_LE>: Move
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);