summaryrefslogtreecommitdiff
path: root/bfd/mach-o.h
diff options
context:
space:
mode:
authoriains <iains>2011-12-19 15:42:34 +0000
committeriains <iains>2011-12-19 15:42:34 +0000
commitbc3cbcefe8a48249dbd700bd22cdf8851884b2e4 (patch)
tree78df679b0ff40ff994d5c7483d2afed045b1836e /bfd/mach-o.h
parent0bc6abb351c27583396a0e5d2fecd0141aa894c7 (diff)
downloadgdb-bc3cbcefe8a48249dbd700bd22cdf8851884b2e4.tar.gz
bfd:
* 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.
Diffstat (limited to 'bfd/mach-o.h')
-rw-r--r--bfd/mach-o.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/mach-o.h b/bfd/mach-o.h
index 23c3e1c079c..89dce1a21ef 100644
--- a/bfd/mach-o.h
+++ b/bfd/mach-o.h
@@ -584,7 +584,7 @@ bfd_boolean bfd_mach_o_set_section_contents (bfd *, asection *, const void *,
file_ptr, bfd_size_type);
unsigned int bfd_mach_o_version (bfd *);
-unsigned int bfd_mach_o_get_section_type_from_name (const char *);
+unsigned int bfd_mach_o_get_section_type_from_name (bfd *, const char *);
unsigned int bfd_mach_o_get_section_attribute_from_name (const char *);
void bfd_mach_o_convert_section_name_to_bfd (bfd *, const char *, const char *,
@@ -636,6 +636,7 @@ typedef struct bfd_mach_o_backend_data
bfd_boolean (*_bfd_mach_o_print_thread)(bfd *, bfd_mach_o_thread_flavour *,
void *, char *);
const mach_o_segment_name_xlat *segsec_names_xlat;
+ bfd_boolean (*bfd_mach_o_section_type_valid_for_target) (unsigned long);
}
bfd_mach_o_backend_data;