aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-10-06 19:19:48 +0000
committerIan Lance Taylor <ian@airs.com>1995-10-06 19:19:48 +0000
commitc80cc8332c2da0b25b5bd03e4f19458e9f2e3db3 (patch)
tree01e246986af84b32f7b2150ecb17d7d88b8a90b9 /bfd/coffcode.h
parent0e1815de9d860d0a8e65a1f02f65081694bfe03b (diff)
downloadgdb-c80cc8332c2da0b25b5bd03e4f19458e9f2e3db3.zip
gdb-c80cc8332c2da0b25b5bd03e4f19458e9f2e3db3.tar.gz
gdb-c80cc8332c2da0b25b5bd03e4f19458e9f2e3db3.tar.bz2
* coffcode.h (bfd_coff_backend_data): Add new field
_bfd_coff_pointerize_aux_hook. (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C or I960, and as 0 otherwise. (bfd_coff_std_swap_table): Initialize new field. * libcoff.h: Rebuild. * coffgen.c (coff_pointerize_aux): Change parameters to take symbol pointer instead of type and class, and to take aux index. Call _bfd_coff_pointerize_aux_hook if it is defined. (coff_get_normalized_symtab): Always call coff_pointerize_aux. * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields. * coff-mips.c (mips_ecoff_backend_data): Likewise.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h65
1 files changed, 64 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 84f1ad4..327d575 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -649,6 +649,12 @@ dependent COFF routines:
. boolean (*_bfd_coff_symname_in_debug) PARAMS ((
. bfd *abfd,
. struct internal_syment *sym));
+. boolean (*_bfd_coff_pointerize_aux_hook) PARAMS ((
+. bfd *abfd,
+. combined_entry_type *table_base,
+. combined_entry_type *symbol,
+. unsigned int indaux,
+. combined_entry_type *aux));
. void (*_bfd_coff_reloc16_extra_cases) PARAMS ((
. bfd *abfd,
. struct bfd_link_info *link_info,
@@ -1169,6 +1175,63 @@ symname_in_debug_hook (abfd, sym)
#endif
+#ifdef RS6000COFF_C
+
+/* We don't want to pointerize the csect auxent of a C_EXT or C_HIDEXT
+ symbol. */
+
+static boolean coff_pointerize_aux_hook
+ PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
+ unsigned int, combined_entry_type *));
+
+/*ARGSUSED*/
+static boolean
+coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
+ bfd *abfd;
+ combined_entry_type *table_base;
+ combined_entry_type *symbol;
+ unsigned int indaux;
+ combined_entry_type *aux;
+{
+ int class = symbol->u.syment.n_sclass;
+
+ /* Return true if we don't want to pointerize this aux entry, which
+ is the case for the last aux entry for a C_EXT or C_HIDEXT
+ symbol. */
+ return ((class == C_EXT || class == C_HIDEXT)
+ && indaux + 1 == symbol->u.syment.n_numaux);
+}
+
+#else
+#ifdef I960
+
+/* We don't want to pointerize bal entries. */
+
+static boolean coff_pointerize_aux_hook
+ PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
+ unsigned int, combined_entry_type *));
+
+/*ARGSUSED*/
+static boolean
+coff_pointerize_aux_hook (abfd, table_base, symbol, indaux, aux)
+ bfd *abfd;
+ combined_entry_type *table_base;
+ combined_entry_type *symbol;
+ unsigned int indaux;
+ combined_entry_type *aux;
+{
+ /* Return true if we don't want to pointerize this aux entry, which
+ is the case for the lastfirst aux entry for a C_LEAFPROC symbol. */
+ return indaux == 1 && symbol->u.syment.n_sclass == C_LEAFPROC;
+}
+
+#else /* ! I960 */
+
+#define coff_pointerize_aux_hook 0
+
+#endif /* ! I960 */
+#endif /* ! RS6000COFF_C */
+
/*
SUBSUBSECTION
Writing relocations
@@ -2837,7 +2900,7 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table =
coff_swap_filehdr_in, coff_swap_aouthdr_in, coff_swap_scnhdr_in,
coff_swap_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook,
coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
coff_reloc16_extra_cases, coff_reloc16_estimate,
coff_sym_is_global, coff_compute_section_file_positions,
coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,