diff options
author | Iain Sandoe <iain@codesourcery.com> | 2011-12-19 15:42:37 +0000 |
---|---|---|
committer | Iain Sandoe <iain@codesourcery.com> | 2011-12-19 15:42:37 +0000 |
commit | ab76eeafa578ca7e301e3aa014e4ed643e32ec2e (patch) | |
tree | 617c8c1e0b565e6331bc0200dbec3e1eb6149dd1 /bfd/mach-o-x86-64.c | |
parent | 72225e1798fce2f36c4eb021338707ed69517abe (diff) | |
download | gdb-ab76eeafa578ca7e301e3aa014e4ed643e32ec2e.zip gdb-ab76eeafa578ca7e301e3aa014e4ed643e32ec2e.tar.gz gdb-ab76eeafa578ca7e301e3aa014e4ed643e32ec2e.tar.bz2 |
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-x86-64.c')
-rw-r--r-- | bfd/mach-o-x86-64.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/mach-o-x86-64.c b/bfd/mach-o-x86-64.c index c86efb7..cc31a1c 100644 --- a/bfd/mach-o-x86-64.c +++ b/bfd/mach-o-x86-64.c @@ -281,6 +281,16 @@ bfd_mach_o_x86_64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } +static bfd_boolean +bfd_mach_o_section_type_valid_for_x86_64 (unsigned long val) +{ + if (val == BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS + || val == BFD_MACH_O_S_LAZY_SYMBOL_POINTERS + || val == BFD_MACH_O_S_SYMBOL_STUBS) + return FALSE; + return TRUE; +} + #define bfd_mach_o_swap_reloc_in bfd_mach_o_x86_64_swap_reloc_in #define bfd_mach_o_swap_reloc_out bfd_mach_o_x86_64_swap_reloc_out @@ -288,6 +298,7 @@ bfd_mach_o_x86_64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, #define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_x86_64_bfd_reloc_name_lookup #define bfd_mach_o_print_thread NULL #define bfd_mach_o_tgt_seg_table NULL +#define bfd_mach_o_section_type_valid_for_tgt bfd_mach_o_section_type_valid_for_x86_64 #define TARGET_NAME mach_o_x86_64_vec #define TARGET_STRING "mach-o-x86-64" |