aboutsummaryrefslogtreecommitdiff
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
commit42fa08916b972ce06b7bcdee8e0ce4171053cd89 (patch)
tree7dfede22b30634369294adc9839b73414f246fc2 /bfd/mach-o-target.c
parentcba0723b0f0fb521d83dc1d7cd1cdcdb4991dd02 (diff)
downloadgdb-42fa08916b972ce06b7bcdee8e0ce4171053cd89.zip
gdb-42fa08916b972ce06b7bcdee8e0ce4171053cd89.tar.gz
gdb-42fa08916b972ce06b7bcdee8e0ce4171053cd89.tar.bz2
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 2a30b2e..8edf547 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