aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-01-25 10:33:55 +0000
committerAlan Modra <amodra@gmail.com>2005-01-25 10:33:55 +0000
commit8615f3f213dc2fa20bd7c0349c84e22c81c48c9e (patch)
treed754ce77faf186ddc15d98cf2c431120ace5ce4e /binutils
parent7e9f086769d3ad7ed3ee0562888fbb72747a02b1 (diff)
downloadgdb-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')
-rw-r--r--binutils/ChangeLog15
-rw-r--r--binutils/nm.c12
2 files changed, 21 insertions, 6 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 368a769..4756f03 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-25 Alan Modra <amodra@bigpond.net.au>
+
+ * nm.c (display_rel_file): Read dynamic syms before calling
+ bfd_get_synthetic_symtab.
+
2005-01-21 Ben Elliston <bje@au.ibm.com>
* dlltool.c (dump_iat): Remove unused function.
@@ -47,7 +52,7 @@
* dlltool.c (set_dll_name_from_def): New function. Strip name
to basename, with warning.
- (def_name): Use it.
+ (def_name): Use it.
(def_library): Likwise.
(main): Strip arg of --dllname to basename, with warning.
Only use basename of exp_name when inferring dll_name.
@@ -163,7 +168,7 @@
decode_location_expression.
(display_debug_frames): Pass 0 as the comp_unit offset to
decode_location_expression.
-
+
2004-12-22 Nick Clifton <nickc@redhat.com>
* readelf.c (last_pointer_size, warned_about_missing_comp_units):
@@ -276,7 +281,7 @@
of a 64-bit format .debug_ranges section.
(display_debug_ranges): New function: Displays the contents of a
32-bit .debug_ranges section.
-
+
(main): Move cmdline_dump_sects and num_cmdline_dump_sects into the
global scope.
(process_object): Initialise the dump_sects array from the
@@ -295,7 +300,7 @@
get_debug_line_pointer_sizes.
(display_debug_lines): Use the new functions.
(display_debug_loc): Likewise.
-
+
(disassemble_section): Change return type to int.
(display_debug_lines): Move local variables to their
innermost scope.
@@ -306,7 +311,7 @@
(debug_apply_rela_addends): Allow relocations against STT_OBJECT
types as well.
-
+
* NEWS: Mention the support for decoding .debug_ranges sections.
* doc/binutils.texi: Document the new command line switch to
readelf.
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);