aboutsummaryrefslogtreecommitdiff
path: root/bfd/mach-o.h
diff options
context:
space:
mode:
authorIain Sandoe <iain@codesourcery.com>2012-01-09 10:47:50 +0000
committerIain Sandoe <iain@codesourcery.com>2012-01-09 10:47:50 +0000
commitb22161d698a0541ddede4074f85dad037d72af05 (patch)
tree53cf2020927eaf6eb69edecb085e14ae1ed33713 /bfd/mach-o.h
parent9f2f828a179a3c726c880ab151ffd297c3c966aa (diff)
downloadgdb-b22161d698a0541ddede4074f85dad037d72af05.zip
gdb-b22161d698a0541ddede4074f85dad037d72af05.tar.gz
gdb-b22161d698a0541ddede4074f85dad037d72af05.tar.bz2
add symbol qualifiers for mach-o to bfd/gas
bfd: * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement. (bfd_mach_o_write_symtab): Remove handling for indirect syms. (bfd_mach_o_primary_symbol_sort_key): Likewise. (bfd_mach_o_cf_symbols): Likewise. (bfd_mach_o_sort_symbol_table): Remove. (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling for indirect and dysymtab counts. Do the symbol sorting here. (bfd_mach_o_build_dysymtab_command): Count the symbol types here. Make the indirect symbols a TODO. (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols. (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with a non-zero value. (bfd_mach_o_read_symtab_symbol): Record the symbol index. (bfd_mach_o_read_symtab_symbol): Adjust recording of global status. * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries. (IS_MACHO_INDIRECT): Remove. (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New. gas: * config/obj-macho.c (obj_mach_o_weak): Remove. (obj_mach_o_common_parse): Set symbol qualifiers. (LAZY, REFE): New macros. (obj_mach_o_symbol_type): New enum. (obj_mach_o_set_symbol_qualifier): New. (obj_mach_o_sym_qual): New. (mach_o_pseudo_table): Add symbol qualifiers, set indirect_symbol to a dummy function. (obj_mach_o_type_for_symbol): New. (obj_macho_frob_label): New. (obj_macho_frob_symbol): New. * config/obj-macho.h (S_SET_ALIGN): Amend temorary var name. (obj_frob_label, obj_macho_frob_label): Declare. (obj_frob_symbol, obj_macho_frob_symbol): Declare. gas/testsuite: * gas/mach-o/err-syms-1.s: New. * gas/mach-o/err-syms-2.s: New. * gas/mach-o/err-syms-3.s: New. * gas/mach-o/symbols-2.d: New. * gas/mach-o/symbols-2.s: New. * gas/mach-o/symbols-3.s: New. * gas/mach-o/symbols-4.s: New. * gas/mach-o/symbols-5.d: New. * gas/mach-o/symbols-5.s: New.
Diffstat (limited to 'bfd/mach-o.h')
-rw-r--r--bfd/mach-o.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/bfd/mach-o.h b/bfd/mach-o.h
index 123edda..ca810a0 100644
--- a/bfd/mach-o.h
+++ b/bfd/mach-o.h
@@ -549,18 +549,6 @@ typedef struct mach_o_data_struct
bfd_mach_o_symtab_command *symtab;
bfd_mach_o_dysymtab_command *dysymtab;
- /* Base values used for building the dysymtab for a single-module object. */
- unsigned long nlocal;
- unsigned long ndefext;
- unsigned long nundefext;
-
- /* If this is non-zero, then the pointer below is populated. */
- unsigned long nindirect;
- /* A set of synthetic symbols representing the 'indirect' ones in the file.
- These should be sorted (a) by the section they represent and (b) by the
- order that they appear within each section. */
- asymbol **indirect_syms;
-
/* A place to stash dwarf2 info for this bfd. */
void *dwarf2_find_line_info;
@@ -691,8 +679,10 @@ typedef struct bfd_mach_o_backend_data
}
bfd_mach_o_backend_data;
-/* Symbol type tests. */
+/* Values used in symbol.udata.i, to signal that the mach-o-specific data in the
+ symbol are not yet set, or need validation (where this is possible). */
-#define IS_MACHO_INDIRECT(x) (((x) & BFD_MACH_O_N_TYPE) == BFD_MACH_O_N_INDR)
+#define SYM_MACHO_FIELDS_UNSET ((bfd_vma) -1)
+#define SYM_MACHO_FIELDS_NOT_VALIDATED ((bfd_vma) -2)
#endif /* _BFD_MACH_O_H_ */