2012-11-14 Tristan Gingold <gingold@adacore.com>

* external.h (mach_o_entry_point_command_external)
	(mach_o_source_version_command_external)
	(mach_o_data_in_code_entry_external): New structures.

	* loader.h (bfd_mach_o_load_command_type): Add
	BFD_MACH_O_LC_MAIN, BFD_MACH_O_LC_DATA_IN_CODE,
	BFD_MACH_O_LC_SOURCE_VERSION and BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS.
	(BFD_MACH_O_REFERENCE_MASK): Adjust value.
	(BFD_MACH_O_N_REF_TO_WEAK): New definition.
	(BFD_MACH_O_N_ARM_THUMB_DEF, BFD_MACH_O_N_SYMBOL_RESOLVER): Likewise.
	(bfd_mach_o_data_in_code_entry_kind): New enum.
This commit is contained in:
Tristan Gingold
2012-11-14 10:45:39 +00:00
parent 1de03e2780
commit a3e9b3ff6e
3 changed files with 62 additions and 8 deletions

View File

@ -124,7 +124,7 @@ struct mach_o_reloc_info_external
#define BFD_MACH_O_SR_SCATTERED 0x80000000
/* For a non-scattered reloc, the relocation info is found in r_symbolnum.
Bytes 1 to 3 contain the symbol number (0xffffff, in a non-scattered PAIR).
Bytes 1 to 3 contain the symbol number (0xffffff, in a non-scattered PAIR).
Byte 4 contains the relocation info - but with differing bit-positions
dependent on target endian-ness - as below. */
@ -308,6 +308,28 @@ struct mach_o_fvmlib_command_external
unsigned char header_addr[4];
};
struct mach_o_entry_point_command_external
{
unsigned char entryoff[8]; /* File offset of the entry point. */
unsigned char stacksize[8]; /* Initial stack size, if no null. */
};
struct mach_o_source_version_command_external
{
unsigned char version[8]; /* Version A.B.C.D.E, with 10 bits for B-E,
and 24 bits for A. */
};
/* The LD_DATA_IN_CODE command use a linkedit_data_command that points to
a table of entries. */
struct mach_o_data_in_code_entry_external
{
unsigned char offset[4]; /* Offset from the mach_header. */
unsigned char length[2]; /* Number of bytes. */
unsigned char kind[2]; /* Kind. See BFD_MACH_O_DICE_ values. */
};
struct mach_o_fat_header_external
{
unsigned char magic[4];