diff options
author | Alan Modra <amodra@gmail.com> | 2005-01-25 10:33:55 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-01-25 10:33:55 +0000 |
commit | 8615f3f213dc2fa20bd7c0349c84e22c81c48c9e (patch) | |
tree | d754ce77faf186ddc15d98cf2c431120ace5ce4e /binutils/nm.c | |
parent | 7e9f086769d3ad7ed3ee0562888fbb72747a02b1 (diff) | |
download | gdb-8615f3f213dc2fa20bd7c0349c84e22c81c48c9e.zip gdb-8615f3f213dc2fa20bd7c0349c84e22c81c48c9e.tar.gz gdb-8615f3f213dc2fa20bd7c0349c84e22c81c48c9e.tar.bz2 |
bfd/
* elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
loadable reloc sections.
(_bfd_elf_canonicalize_dynamic_reloc): Likewise.
(_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
binutils/
* nm.c (display_rel_file): Read dynamic syms before calling
bfd_get_synthetic_symtab.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r-- | binutils/nm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/binutils/nm.c b/binutils/nm.c index 3668d6b..917137f 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -1,6 +1,6 @@ /* nm.c -- Describe symbol table of a rel file. Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004 + 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -1026,8 +1026,18 @@ display_rel_file (bfd *abfd, bfd *archive_bfd) } else { + long storage = bfd_get_dynamic_symtab_upper_bound (abfd); + static_count = symcount; static_syms = minisyms; + + if (storage > 0) + { + dyn_syms = xmalloc (storage); + dyn_count = bfd_canonicalize_dynamic_symtab (abfd, dyn_syms); + if (dyn_count < 0) + bfd_fatal (bfd_get_filename (abfd)); + } } synth_count = bfd_get_synthetic_symtab (abfd, static_count, static_syms, dyn_count, dyn_syms, &synthsyms); |