summaryrefslogtreecommitdiff
path: root/bfd/mach-o-x86-64.c
Commit message (Collapse)AuthorAgeFilesLines
* correct some mach-o section specification nits.iains2012-02-101-1/+18
| | | | | | | | | | | bfd: * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section parameters. * mach-o-x86-64.c (text_section_names_xlat): New. (mach_o_x86_64_segsec_names_xlat): New. (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat. * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
* 2012-01-04 Tristan Gingold <gingold@adacore.com>Tristan Gingold2012-01-041-0/+35
| | | | | | | | | | * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1, BFD_RELOC_MACH_O_X86_64_PCREL32_2, BFD_RELOC_MACH_O_X86_64_PCREL32_4, BFD_RELOC_MACH_O_X86_64_BRANCH32, BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, BFD_RELOC_MACH_O_X86_64_GOT.
* bfd:iains2011-12-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | * mach-o-i386.c (bfd_mach_o_section_type_valid_for_tgt): Define NULL. * mach-o-target.c (bfd_mach_o_backend_data): Initialize bfd_mach_o_section_type_valid_for_tgt * mach-o-x86-64.c (bfd_mach_o_section_type_valid_for_x86_64): New. (bfd_mach_o_section_type_valid_for_tgt): Set to bfd_mach_o_section_type_valid_for_x86_64. * mach-o.c (bfd_mach_o_section_type_name): Reorder and eliminate dup. (bfd_mach_o_section_attribute_name): Reorder. (bfd_mach_o_get_section_type_from_name): If the target has defined a validator for section types, then use it. * mach-o.h (bfd_mach_o_get_section_type_from_name): Alter declaration to include the bfd. gas: * config/obj-macho.c (obj_mach_o_section): Account for target-dependent section types. Improve error handling when wrong section types/attributes are specified. gas/testsuite: * gas/mach-o/err-sections-1.s: New. * gas/mach-o/err-sections-2.s: New. * gas/mach-o/sections-3.d: New. * gas/mach-o/sections-3.s: New.
* 2011-12-16 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>Tristan Gingold2011-12-161-0/+1
| | | | | | | | | | * mach-o-i386.c (TARGET_PRIORITY): Define as 0 (top priority) * mach-o-target.c (TARGET_NAME): Use TARGET_PRIORITY * mach-o-x86-64.c (TARGET_PRIORITY): Define as 0 (top priority) * mach-o.c (bfd_mach_o_header_p): Remove special handling for mach-o-i386. (TARGET_PRIORITY) Set 1 for mach-o-be and mach-o-le, and set 0 for mach-o-fat.
* bfd/Tristan Gingold2011-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* bfd/Tristan Gingold2011-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Tristan Gingold <gingold@adacore.com>Tristan Gingold2011-08-081-14/+29
| | | | | | | * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Fix cut-and-past typos. (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32_PCREL, BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 and BFD_RELOC_MACH_O_X86_64_GOT_LOAD. Share common code.
* 2010-01-13 Tristan Gingold <gingold@adacore.com>Tristan Gingold2010-01-131-0/+280
* config.bfd: Remove duplicated target vector for i386-*-darwin. Appends new arch instead of overriding. Use mach_o_x86_64_vec for x86_64-*-darwin. * configure.in: Add mach_o_x86_64_vec. * configure: Regenerate. * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector. * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c * Makefile.in: Regenerate. * mach-o-x86-64.c: New file.