summaryrefslogtreecommitdiff
path: root/bfd/mach-o.h
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2010-01-11 15:39:41 +0000
committerTristan Gingold <gingold@adacore.com>2010-01-11 15:39:41 +0000
commitccdf7ed7ba70027ab10f222a085a556a76df0aac (patch)
treeee6bbb0296c8f1af370e0f7d1f10044ab8738ccf /bfd/mach-o.h
parent6ad9b22d370fef1fe039793c92a7a3cb5a7cb899 (diff)
downloadbinutils-redhat-ccdf7ed7ba70027ab10f222a085a556a76df0aac.tar.gz
2010-01-11 Tristan Gingold <gingold@adacore.com>
* mach-o.h (bfd_mach_o_backend_data): Add arch field. (bfd_mach_o_set_arch_mach): New prototype. * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject. (bfd_mach_o_set_arch_mach): New function. (bfd_mach_o_gen_mkobject): New function. Set TARGET_ARCHITECTURE for the generic back-ends. * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define. Check that TARGET_ARCHITECTURE is defined. Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure. * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
Diffstat (limited to 'bfd/mach-o.h')
-rw-r--r--bfd/mach-o.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/mach-o.h b/bfd/mach-o.h
index 62f7709fc7..bdd76321a1 100644
--- a/bfd/mach-o.h
+++ b/bfd/mach-o.h
@@ -845,6 +845,7 @@ bfd_mach_o_data_struct;
/* Target specific routines. */
typedef struct bfd_mach_o_backend_data
{
+ enum bfd_architecture arch;
bfd_boolean (*_bfd_mach_o_swap_reloc_in)(arelent *, bfd_mach_o_reloc_info *);
bfd_boolean (*_bfd_mach_o_swap_reloc_out)(arelent *, bfd_mach_o_reloc_info *);
bfd_boolean (*_bfd_mach_o_print_thread)(bfd *, bfd_mach_o_thread_flavour *,
@@ -865,6 +866,8 @@ 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 *);
+bfd_boolean bfd_mach_o_set_arch_mach (bfd *, enum bfd_architecture,
+ unsigned long);
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 *);