diff options
author | Tristan Gingold <tristan.gingold@adacore.com> | 2014-03-26 15:01:53 +0100 |
---|---|---|
committer | Tristan Gingold <tristan.gingold@adacore.com> | 2014-04-02 15:03:51 +0200 |
commit | 7a79c51466c30188d49d03d3e3593c87e5a3345e (patch) | |
tree | ba47b17425271ba5074065034c29bd37f8055c02 /include | |
parent | 5979d6b69b20a8355ea94b75fad97415fce4788c (diff) | |
download | gdb-7a79c51466c30188d49d03d3e3593c87e5a3345e.zip gdb-7a79c51466c30188d49d03d3e3593c87e5a3345e.tar.gz gdb-7a79c51466c30188d49d03d3e3593c87e5a3345e.tar.bz2 |
mach-o: read and dump: prebound_dylib, prebind_cksum, twolevel_hints.
include/mach-o:
* external.h (mach_o_prebound_dylib_command_external)
(mach_o_prebind_cksum_command_external)
(mach_o_twolevel_hints_command_external): New types.
bfd/
* mach-o.h (bfd_mach_o_twolevel_hints_command)
(bfd_mach_o_prebind_cksum_command): New types.
(bfd_mach_o_prebound_dylib_command): Rewrite.
(bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
fields.
* mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
command.
(bfd_mach_o_read_prebind_cksum): New function.
(bfd_mach_o_read_twolevel_hints): Ditto.
(bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
commands.
binutils/
* od-macho.c (OPT_TWOLEVEL_HINTS): New macro.
(options): Add entry for twolevel_hints.
(dump_data_in_code): Fix error message.
(dump_twolevel_hints): New function.
(dump_load_command): Handle prebound dylib, prebind cksum
and twolevel hints.
(mach_o_dump): Handle twolevel hints.
Diffstat (limited to 'include')
-rw-r--r-- | include/mach-o/ChangeLog | 6 | ||||
-rw-r--r-- | include/mach-o/external.h | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/mach-o/ChangeLog b/include/mach-o/ChangeLog index 3624f8a..b3dc669 100644 --- a/include/mach-o/ChangeLog +++ b/include/mach-o/ChangeLog @@ -1,3 +1,9 @@ +2014-04-02 Tristan Gingold <gingold@adacore.com> + + * external.h (mach_o_prebound_dylib_command_external) + (mach_o_prebind_cksum_command_external) + (mach_o_twolevel_hints_command_external): New types. + 2014-03-26 Tristan Gingold <gingold@adacore.com> * loader.h (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_ARM64. diff --git a/include/mach-o/external.h b/include/mach-o/external.h index d92c10e..4fb950b 100644 --- a/include/mach-o/external.h +++ b/include/mach-o/external.h @@ -287,6 +287,24 @@ struct mach_o_dyld_info_command_external unsigned char export_size[4]; }; +struct mach_o_prebound_dylib_command_external +{ + unsigned char name[4]; + unsigned char nmodules[4]; + unsigned char linked_modules[4]; +}; + +struct mach_o_prebind_cksum_command_external +{ + unsigned char cksum[4]; +}; + +struct mach_o_twolevel_hints_command_external +{ + unsigned char offset[4]; + unsigned char nhints[4]; +}; + struct mach_o_version_min_command_external { unsigned char version[4]; |