aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2013-08-19 15:08:52 +0000
committerTristan Gingold <gingold@adacore.com>2013-08-19 15:08:52 +0000
commit8b64b65e23fee758d9a81c9f5c940e23e48a2fea (patch)
treec52f03ec41daa3bc917b8a40002bdcd65c044503 /binutils/nm.c
parent12696c10906026672f17a551ae1fa5d62878751c (diff)
downloadgdb-8b64b65e23fee758d9a81c9f5c940e23e48a2fea.zip
gdb-8b64b65e23fee758d9a81c9f5c940e23e48a2fea.tar.gz
gdb-8b64b65e23fee758d9a81c9f5c940e23e48a2fea.tar.bz2
binutils/
2013-08-19 Tristan Gingold <gingold@adacore.com> * nm.c (print_size_symbols): Directly get symbol size. binutils/testsuite/ 2013-08-19 Tristan Gingold <gingold@adacore.com> * binutils-all/nm.exp: Add a test for nm --size-sort * binutils-all/nm-elf-1.s: New file. * binutils-all/nm-1.s: New file.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index ad38e27..5c32520 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -951,19 +951,12 @@ print_size_symbols (bfd *abfd, bfd_boolean is_dynamic,
for (; from < fromend; from++)
{
asymbol *sym;
- bfd_vma ssize;
sym = bfd_minisymbol_to_symbol (abfd, is_dynamic, from->minisym, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
- /* For elf we have already computed the correct symbol size. */
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
- ssize = from->size;
- else
- ssize = from->size - bfd_section_vma (abfd, bfd_get_section (sym));
-
- print_symbol (abfd, sym, ssize, archive_bfd);
+ print_symbol (abfd, sym, from->size, archive_bfd);
}
}