* 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.
This commit is contained in:
Ian Lance Taylor 1995-10-06 19:19:48 +00:00
parent 0e1815de9d
commit c80cc8332c
6 changed files with 105 additions and 35 deletions

View file

@ -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,