-mach_o_data_struct;
-
-typedef struct mach_o_data_struct bfd_mach_o_data_struct;
-
-bfd_boolean bfd_mach_o_valid (bfd *);
-int bfd_mach_o_scan_read_symtab_symbol (bfd *, bfd_mach_o_symtab_command *, asymbol *, unsigned long);
-int bfd_mach_o_scan_read_symtab_strtab (bfd *, bfd_mach_o_symtab_command *);
-int bfd_mach_o_scan_read_symtab_symbols (bfd *, bfd_mach_o_symtab_command *);
-int bfd_mach_o_scan_read_dysymtab_symbol (bfd *, bfd_mach_o_dysymtab_command *, bfd_mach_o_symtab_command *, asymbol *, unsigned long);
-int bfd_mach_o_scan_start_address (bfd *);
-int bfd_mach_o_scan (bfd *, bfd_mach_o_header *, bfd_mach_o_data_struct *);
-bfd_boolean bfd_mach_o_mkobject (bfd *);
-const bfd_target * bfd_mach_o_object_p (bfd *);
-const bfd_target * bfd_mach_o_core_p (bfd *);
-const bfd_target * bfd_mach_o_archive_p (bfd *);
-bfd * bfd_mach_o_openr_next_archived_file (bfd *, bfd *);
-int bfd_mach_o_lookup_section (bfd *, asection *, bfd_mach_o_load_command **, bfd_mach_o_section **);
-int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command **);
-unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type);
-int bfd_mach_o_core_fetch_environment (bfd *, unsigned char **, unsigned int *);
-char * bfd_mach_o_core_file_failing_command (bfd *);
-int bfd_mach_o_core_file_failing_signal (bfd *);
-bfd_boolean bfd_mach_o_core_file_matches_executable_p (bfd *, bfd *);
-
-extern const bfd_target mach_o_be_vec;
-extern const bfd_target mach_o_le_vec;
+bfd_mach_o_backend_data;
+
+#define bfd_mach_o_get_data(abfd) ((abfd)->tdata.mach_o_data)
+#define bfd_mach_o_get_backend_data(abfd) \
+ ((bfd_mach_o_backend_data*)(abfd)->xvec->backend_data)
+
+bfd_boolean bfd_mach_o_valid (bfd *);
+int bfd_mach_o_scan_read_dysymtab_symbol (bfd *, bfd_mach_o_dysymtab_command *, bfd_mach_o_symtab_command *, bfd_mach_o_asymbol *, unsigned long);
+int bfd_mach_o_scan_start_address (bfd *);
+int bfd_mach_o_scan (bfd *, bfd_mach_o_header *, bfd_mach_o_data_struct *);
+bfd_boolean bfd_mach_o_mkobject_init (bfd *);
+const bfd_target *bfd_mach_o_object_p (bfd *);
+const bfd_target *bfd_mach_o_core_p (bfd *);
+const bfd_target *bfd_mach_o_archive_p (bfd *);
+bfd *bfd_mach_o_openr_next_archived_file (bfd *, bfd *);
+int bfd_mach_o_lookup_section (bfd *, asection *, bfd_mach_o_load_command **, bfd_mach_o_section **);
+int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command **);
+bfd_boolean bfd_mach_o_write_contents (bfd *);
+bfd_boolean bfd_mach_o_bfd_copy_private_symbol_data (bfd *, asymbol *,
+ bfd *, asymbol *);
+bfd_boolean bfd_mach_o_bfd_copy_private_section_data (bfd *, asection *,
+ bfd *, asection *);
+bfd_boolean bfd_mach_o_bfd_copy_private_bfd_data (bfd *, bfd *);
+long bfd_mach_o_get_symtab_upper_bound (bfd *);
+long bfd_mach_o_canonicalize_symtab (bfd *, asymbol **);
+long bfd_mach_o_get_reloc_upper_bound (bfd *, asection *);
+long bfd_mach_o_canonicalize_reloc (bfd *, asection *, arelent **, asymbol **);
+long bfd_mach_o_get_dynamic_reloc_upper_bound (bfd *);
+long bfd_mach_o_canonicalize_dynamic_reloc (bfd *, arelent **, asymbol **);
+asymbol *bfd_mach_o_make_empty_symbol (bfd *);
+void bfd_mach_o_get_symbol_info (bfd *, asymbol *, symbol_info *);
+void bfd_mach_o_print_symbol (bfd *, PTR, asymbol *, bfd_print_symbol_type);
+bfd_boolean bfd_mach_o_bfd_print_private_bfd_data (bfd *, PTR);
+int bfd_mach_o_sizeof_headers (bfd *, struct bfd_link_info *);
+unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type);
+int bfd_mach_o_core_fetch_environment (bfd *, unsigned char **, unsigned int *);
+char *bfd_mach_o_core_file_failing_command (bfd *);
+int bfd_mach_o_core_file_failing_signal (bfd *);
+bfd_boolean bfd_mach_o_core_file_matches_executable_p (bfd *, bfd *);
+bfd *bfd_mach_o_fat_extract (bfd *, bfd_format , const bfd_arch_info_type *);
+const bfd_target *bfd_mach_o_header_p (bfd *, bfd_mach_o_filetype,
+ bfd_mach_o_cpu_type);
+bfd_boolean bfd_mach_o_build_commands (bfd *);
+bfd_boolean bfd_mach_o_set_section_contents (bfd *, asection *, const void *,
+ file_ptr, bfd_size_type);
+unsigned int bfd_mach_o_version (bfd *);
+