From e55d08d1a141d929c39cca3e007729b7a3ab9477 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 30 Jul 1999 21:34:44 +0000 Subject: Jakub Jelinek * elf-bfd.h (struct elf_backend_data): Add print_symbol_all and output_arch_syms backend methods. * elfxx-target.h: Likewise. * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create, sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms, sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New functions. (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER symbols in .dynsym, add their names into .dynstr. Put those symbols into dynlocal. (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER pointers to STT_REGISTER symbols in dynsym section. (sparc64_elf_print_symbol_all): New function. * elf.c (bfd_elf_print_symbol): Allow special backend symbol printing using the print_symbol_all hook. --- bfd/elf-bfd.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bfd/elf-bfd.h') diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 577823b8257..3fa25136fd2 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -581,6 +581,21 @@ struct elf_backend_data void (*elf_backend_post_process_headers) PARAMS ((bfd *, struct bfd_link_info *)); + /* This function, if defined, prints a symbol to file and returns the + name of the symbol to be printed. It should return NULL to fall + back to default symbol printing. */ + const char *(*elf_backend_print_symbol_all) + PARAMS ((bfd *, PTR, asymbol *)); + + /* This function, if defined, is called after all local symbols and + global symbols converted to locals are emited into the symtab + section. It allows the backend to emit special global symbols + not handled in the hash table. */ + boolean (*elf_backend_output_arch_syms) + PARAMS ((bfd *, struct bfd_link_info *, PTR, + boolean (*) PARAMS ((PTR, const char *, + Elf_Internal_Sym *, asection *)))); + /* The swapping table to use when dealing with ECOFF information. Used for the MIPS ELF .mdebug section. */ const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap; -- cgit v1.2.1