summaryrefslogtreecommitdiff
path: root/bfd/mach-o-target.c
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
commitc92e3664625fe6f53cbd3b8b047d5c2adb66fe43 (patch)
tree65ff991e48e2599cf19c59c2ae1a83cc5a46144e /bfd/mach-o-target.c
parent19491562f0a5d09b7d6646625d721449f37533f8 (diff)
downloadgdb-c92e3664625fe6f53cbd3b8b047d5c2adb66fe43.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-target.c')
-rw-r--r--bfd/mach-o-target.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/mach-o-target.c b/bfd/mach-o-target.c
index 2a30b2ed1f6..8edf547a385 100644
--- a/bfd/mach-o-target.c
+++ b/bfd/mach-o-target.c
@@ -57,7 +57,6 @@
_bfd_generic_copy_link_hash_symbol_type
#define bfd_mach_o_bfd_final_link _bfd_generic_final_link
#define bfd_mach_o_bfd_link_split_section _bfd_generic_link_split_section
-#define bfd_mach_o_set_arch_mach bfd_default_set_arch_mach
#define bfd_mach_o_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
#define bfd_mach_o_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define bfd_mach_o_get_section_contents _bfd_generic_get_section_contents
@@ -85,6 +84,10 @@
#error TARGET_STRING must be defined
#endif /* TARGET_STRING */
+#ifndef TARGET_ARCHITECTURE
+#error TARGET_ARCHITECTURE must be defined
+#endif /* TARGET_ARCHITECTURE */
+
#ifndef TARGET_BIG_ENDIAN
#error TARGET_BIG_ENDIAN must be defined
#endif /* TARGET_BIG_ENDIAN */
@@ -99,6 +102,7 @@
static const bfd_mach_o_backend_data TARGET_NAME_BACKEND =
{
+ TARGET_ARCHITECTURE,
bfd_mach_o_swap_reloc_in,
bfd_mach_o_swap_reloc_out,
bfd_mach_o_print_thread