diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/objdump.c | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index e00ad96..958a26a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2004-08-17 Jakub Jelinek <jakub@redhat.com> + + * objdump.c (dump_bfd): For relocatable objects, pass syms instead + of dynsyms to bfd_get_synthetic_symtab. + 2004-08-16 Alan Modra <amodra@bigpond.net.au> * readelf.c (debug_apply_rela_addends): New function, extracted from.. diff --git a/binutils/objdump.c b/binutils/objdump.c index 7cc9640..af04b70 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -2564,9 +2564,19 @@ dump_bfd (bfd *abfd) if (dump_dynamic_symtab || dump_dynamic_reloc_info || (disassemble && bfd_get_dynamic_symtab_upper_bound (abfd) > 0)) dynsyms = slurp_dynamic_symtab (abfd); - if (disassemble && dynsymcount > 0) + if (disassemble) { - synthcount = bfd_get_synthetic_symtab (abfd, dynsyms, &synthsyms); + synthcount = 0; + if (bfd_get_file_flags (abfd) & (DYNAMIC | EXEC_P)) + { + if (dynsymcount > 0) + synthcount = bfd_get_synthetic_symtab (abfd, dynsyms, &synthsyms); + } + else + { + if (symcount > 0) + synthcount = bfd_get_synthetic_symtab (abfd, syms, &synthsyms); + } if (synthcount < 0) synthcount = 0; } |