Tristan Gingold
a3e9b3ff6e
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.
2012-11-14 10:45:39 +00:00
Tristan Gingold
1de03e2780
2012-11-14 Tristan Gingold <gingold@adacore.com>
...
* arm.h: New file.
2012-11-14 10:22:27 +00:00
Iain D Sandoe
e3ed49775e
deal with endian-ness in mach-o non-scattered relocs.
...
BFD:
* mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
(bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
bit-fields when target and host differ in endian-ness. When
PAIRs are non-scattered find the 'symbol' from the preceding
reloc. Add FIXME re. reloc symbols on section boundaries.
(bfd_mach_o_swap_out_non_scattered_reloc): New.
(bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
include/mach-o:
* external.h: Add comments about relocations fields. Add macros
for non-scattered relocations. Move scattered relocation macros to here.
* reloc.h: Remove macros related to external representation of reloc fields.
2012-02-23 16:29:56 +00:00
Iain D Sandoe
2ed2809fd6
add indirect_symbol to mach-o port.
...
bfd:
* mach-o.c (bfd_mach_o_count_indirect_symbols): New.
(bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
* mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
file. (bfd_mach_o_section): Add indirect_syms field.
gas:
* config/obj-macho.c (obj_mach_o_set_symbol_qualifier): Switch off
lazy when the symbol is private_extern.
(obj_mach_o_indirect_sym): New type.
(obj_mach_o_indirect_symbol): New.
(mach_o_pseudo_table): Use obj_mach_o_indirect_symbol.
(obj_macho_frob_label): Adjust to avoid adding bsyms for locals.
(obj_macho_frob_label): Likewise. Adjust external and comm
symbol tests.
(obj_mach_o_set_indirect_symbols): New.
(obj_mach_o_frob_file_after_relocs): New.
*config/obj-macho.h (obj_frob_file_after_relocs): Define.
(obj_mach_o_frob_file_after_relocs): Declare.
include/mach-o:
* loader.h (BFD_MACH_O_INDIRECT_SYM_LOCAL): New.
(BFD_MACH_O_INDIRECT_SYM_ABS): New
gas/testsuite:
* gas/mach-o/dysymtab-2.d: New.
* gas/mach-o/err-syms-4.s: New.
* gas/mach-o/err-syms-5.s: New.
* gas/mach-o/err-syms-6.s: New.
* gas/mach-o/symbols-6-64.d: New.
* gas/mach-o/symbols-6-64.s: New.
* gas/mach-o/symbols-6.d: New.
* gas/mach-o/symbols-6.s: New.
2012-01-12 14:03:12 +00:00
Tristan Gingold
4ee8ef6a7d
bfd/
...
2012-01-04 Tristan Gingold <gingold@adacore.com>
* mach-o.h (bfd_mach_o_fvmlib_command): New structure.
(bfd_mach_o_load_command): Add fvmlib field.
* mach-o.c (bfd_mach_o_read_fvmlib): New function.
(bfd_mach_o_read_command): Handle fvmlib.
binutils/
2012-01-04 Tristan Gingold <gingold@adacore.com>
* od-macho.c (dump_load_command): Handle fvmlib.
include/mach-o/
2012-01-04 Tristan Gingold <gingold@adacore.com>
* external.h (mach_o_fvmlib_command_external): New structure.
2012-01-04 10:37:36 +00:00
Tristan Gingold
4d0c04db40
bfd/
...
2012-01-04 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_convert_architecture): Reindent.
Decode msubtype for ARM.
include/mach-o/
2012-01-04 Tristan Gingold <gingold@adacore.com>
* loader.h: Update copyright year.
(bfd_mach_o_cpu_subtype): Add ARM subtypes.
2012-01-04 10:25:14 +00:00
Tristan Gingold
1cf6182800
bfd/
...
2012-01-04 Tristan Gingold <gingold@adacore.com>
* mach-o.h: Reindent header.
(bfd_mach_o_encryption_info_command): New structure.
(bfd_mach_o_load_command): Add encryption_info field.
* mach-o.c (bfd_mach_o_read_encryption_info): New function.
(bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
(bfd_mach_o_read_command): Adjust error message.
binutils/
2012-01-04 Tristan Gingold <gingold@adacore.com>
* od-macho.c: Update copyright year.
(dump_load_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
include/mach-o/
2012-01-04 Tristan Gingold <gingold@adacore.com>
* external.h: Update copyright year.
(mach_o_symtab_command_external): Add comments.
(mach_o_encryption_info_command_external): New structure.
2012-01-04 09:58:55 +00:00
Tristan Gingold
6625879aa6
binutils/
...
2011-12-16 Tristan Gingold <gingold@adacore.com>
* od-macho.c: Include mach-o/codesign.h
(OPT_CODESIGN): Define.
(options): Add an entry for codesign.
(mach_o_help): Likewise.
(dump_header): Fix indentation.
(dump_thread): Do not test result of xmalloc.
(bfd_mach_o_cs_magic, bfd_mach_o_cs_hash_type): New.
(dump_code_signature_superblob): New function.
(swap_code_codedirectory_v1_in): Likewise.
(hexdump): Likewise.
(dump_code_signature_codedirectory): Likewise.
(dump_code_signature_blob, dump_code_signature): Likewise.
(dump_load_command): Dump code signature.
(mach_o_dump): Likewise.
include/mach-o/
2011-12-16 Tristan Gingold <gingold@adacore.com>
* codesign.h: New file.
2011-12-16 10:23:01 +00:00
Tristan Gingold
a5d1e69e3d
bfd/
...
2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* mach-o-i386.c (text_section_names_xlat): New table.
(data_section_names_xlat): Likewise.
(import_section_names_xlat): Likewise.
(mach_o_i386_segsec_names_xlat): Likewise.
(bfd_mach_o_tgt_seg_table): Use new tables.
* mach-o-x86-64.c (bfd_mach_o_tgt_seg_table): Set NULL.
* mach-o.c (mach_o_section_name_xlat, mach_o_segment_name_xlat):
Move to mach-o.h as typedefs.
(text_section_names_xlat): Update for current GCC usage.
(data_section_names_xlat): Likewise.
(dwarf_section_names_xlat): Likewise.
(objc_section_names_xlat): New table.
(segsec_names_xlat): Add objc table.
(bfd_mach_o_normalize_section_name): Replace with...
(bfd_mach_o_section_data_for_mach_sect): New.
(bfd_mach_o_section_data_for_bfd_name): New.
(bfd_mach_o_section_data_for_bfd_name): Update to use additional data.
(bfd_mach_o_convert_section_name_to_mach_o): Likewise.
(bfd_mach_o_bfd_copy_private_section_data): Implement.
(bfd_mach_o_write_symtab): Write a zero-length string as the first entry
for compatibility with system tools.
(bfd_mach_o_build_commands): Update section alignment info.
(bfd_mach_o_new_section_hook): Use translation table data to define
default section flags, type, attributes and alignment, when available.
(bfd_mach_o_init_section_from_mach_o): Add TODO comment.
(bfd_mach_o_section_type_name): Add 'symbol_stubs'.
(bfd_mach_o_section_attribute_name): Add 'self_modifying_code'.
(bfd_mach_o_get_section_type_from_name): Change "not-found" return
value.
(bfd_mach_o_tgt_seg_table): Set default NULL.
* mach-o.h (bfd_mach_o_segment_command): Use define for name length.
(bfd_mach_o_backend_data): Move until after contents are defined.
(bfd_mach_o_normalize_section_name): Remove.
(bfd_mach_o_convert_section_name_to_bfd): Declare.
(mach_o_section_name_xlat): Declare.
(mach_o_segment_name_xlat): Declare.
(bfd_mach_o_section_data_for_mach_sect): Declare.
(bfd_mach_o_section_data_for_bfd_name): Declare.
include/
2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* mach-o/loader.h (bfd_mach_o_section_type): define
BFD_MACH_O_S_ATTR_NONE to 0.
gas/
2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* config/obj-macho.c: Add some more top-level comments.
(collect_16char_name): New.
(obj_mach_o_section): Amend to allow syntax compatible with existing system
tools. Use section translation data when available.
(obj_mach_o_segT_from_bfd_name): New.
(known_sections): Update.
(obj_mach_o_known_section): Use obj_mach_o_segT_from_bfd_name.
(objc_sections): New.
(obj_mach_o_objc_section): New.
(debug_sections): New.
(obj_mach_o_debug_section): New.
(tgt_sections): New.
(obj_mach_o_opt_tgt_section): New.
(obj_mach_o_base_section): New.
(obj_mach_o_common_parse): Update to create BSS on demand and to handle
lcomm optional alignment param.
(obj_mach_o_comm): Update parameter name.
(obj_mach_o_placeholder): New.
(mach_o_pseudo_table): Update for GCC section directives.
* config/obj-macho.h (_OBJ_MACH_O_H): New.
(USE_ALIGN_PTWO): Define.
(S_SET_ALIGN) Define.
2011-12-14 10:30:09 +00:00
Tristan Gingold
9ca6dff1a9
bfd/
...
2011-08-08 Tristan Gingold <gingold@adacore.com>
* mach-o.h (bfd_mach_o_version_min_command): New structure.
(bfd_mach_o_load_command): Add version_min.
(mach_o_data_struct): Fix comment.
* mach-o.c (bfd_mach_o_read_version_min): New function.
(bfd_mach_o_read_command): Handle BFD_MACH_O_LC_FUNCTION_STARTS,
BFD_MACH_O_LC_VERSION_MIN_MACOSX and
BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
(bfd_mach_o_get_name_or_null): New function.
(bfd_mach_o_get_name): Use the above new one.
(bfd_mach_o_load_command_name): Add the above new commands.
(bfd_mach_o_bfd_print_private_bfd_data): Display numerically
unknown commands. Handle BFD_MACH_O_LC_FUNCTION_STARTS,
BFD_MACH_O_LC_VERSION_MIN_MACOSX and
BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
include/mach-o/
2011-08-08 Tristan Gingold <gingold@adacore.com>
* loader.h (bfd_mach_o_load_command_type): Add
BFD_MACH_O_LC_LOAD_UPWARD_DYLIB, BFD_MACH_O_LC_VERSION_MIN_MACOSX,
BFD_MACH_O_LC_VERSION_MIN_IPHONEOS, BFD_MACH_O_LC_FUNCTION_STARTS,
and BFD_MACH_O_LC_DYLD_ENVIRONMENT.
* external.h (mach_o_version_min_command_external): New structure.
2011-08-08 10:21:02 +00:00
Tristan Gingold
30ef5c04bd
bfd/
...
2011-08-08 Tristan Gingold <gingold@adacore.com>
* mach-o.h: Move size macros to external.h
Move reloc macros to reloc.h and x86-64.h.
* mach-o-i386.c: Includes mach-o/reloc.h
* mach-o-x86-64.c: Ditto and includes mach-o/x86-64.h
* mach-o.c: Add includes.
(bfd_mach_o_write_header): Use structure from external.h to convert.
(bfd_mach_o_write_thread): Ditto.
(bfd_mach_o_write_relocs): Ditto.
(bfd_mach_o_write_section_32): Ditto.
(bfd_mach_o_write_section_64): Ditto.
(bfd_mach_o_write_segment_32): Ditto.
(bfd_mach_o_write_segment_64): Ditto.
(bfd_mach_o_write_symtab): Ditto.
(bfd_mach_o_write_contents): Ditto.
(bfd_mach_o_read_header): Ditto.
(bfd_mach_o_read_section_32): Ditto.
(bfd_mach_o_read_section_64): Ditto.
(bfd_mach_o_read_symtab_symbol): Ditto.
(bfd_mach_o_read_dylinker): Ditto.
(bfd_mach_o_read_dylib): Ditto.
(bfd_mach_o_read_dysymtab): Ditto.
(bfd_mach_o_read_symtab): Ditto.
(bfd_mach_o_read_linkedit): Ditto.
(bfd_mach_o_read_str): Ditto.
(bfd_mach_o_read_dyld_info): Ditto.
(bfd_mach_o_read_segment): Ditto.
(bfd_mach_o_read_command): Ditto.
(bfd_mach_o_archive_p): Ditto.
(bfd_mach_o_canonicalize_one_reloc): Ditto. Change the BUF parameter.
(bfd_mach_o_canonicalize_relocs): Adjust to call the above function.
(bfd_mach_o_read_dysymtab_symbol): Rename BUF variable.
(bfd_mach_o_read_uuid): Remove useless cast. Use a macro instead
of an hard-coded value.
include/mach-o
2011-08-08 Tristan Gingold <gingold@adacore.com>
* loader.h: Reorder declarations.
* x86-64.h: New file.
* external.h: New file.
* reloc.h: New file.
2011-08-08 08:59:33 +00:00
Tristan Gingold
eb559bb04a
bfd/
...
2011-07-06 Tristan Gingold <gingold@adacore.com>
* mach-o.h: Move loader related definitions to
include/mach-o/loader.h. Include it.
include/mach-o/
2011-07-06 Tristan Gingold <gingold@adacore.com>
* loader.h: New file.
2011-07-06 07:22:20 +00:00