aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-07-30 21:34:44 +0000
committerRichard Henderson <rth@redhat.com>1999-07-30 21:34:44 +0000
commit587ff49e9a50b61e86ea78ba3271f3ca24c1b0e8 (patch)
treec5de899ca7fe15148721af69c6bae1b9f03810ea /bfd/elf.c
parentd512aa072eb56b1fb1a5f1649b8c52a140901916 (diff)
downloadgdb-587ff49e9a50b61e86ea78ba3271f3ca24c1b0e8.zip
gdb-587ff49e9a50b61e86ea78ba3271f3ca24c1b0e8.tar.gz
gdb-587ff49e9a50b61e86ea78ba3271f3ca24c1b0e8.tar.bz2
Jakub Jelinek <jj@ultra.linux.cz>
* 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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 9291b98..997408c 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -758,8 +758,21 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
case bfd_print_symbol_all:
{
CONST char *section_name;
+ CONST char *name = NULL;
+ struct elf_backend_data *bed;
+
section_name = symbol->section ? symbol->section->name : "(*none*)";
- bfd_print_symbol_vandf ((PTR) file, symbol);
+
+ bed = get_elf_backend_data (abfd);
+ if (bed->elf_backend_print_symbol_all)
+ name = (*bed->elf_backend_print_symbol_all) (abfd, filep, symbol);
+
+ if (name == NULL)
+ {
+ name = symbol->name;
+ bfd_print_symbol_vandf ((PTR) file, symbol);
+ }
+
fprintf (file, " %s\t", section_name);
/* Print the "other" value for a symbol. For common symbols,
we've already printed the size; now print the alignment.
@@ -827,7 +840,7 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
((unsigned int)
((elf_symbol_type *) symbol)->internal_elf_sym.st_other));
- fprintf (file, " %s", symbol->name);
+ fprintf (file, " %s", name);
}
break;
}