aboutsummaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2002-07-24 15:25:03 +0000
committerDave Brolley <brolley@redhat.com>2002-07-24 15:25:03 +0000
commit8e1a114b75cd91c110ca78b6eee8ad3df494ddab (patch)
treea46e1bc9caa939f3378d81d64b2c6d89aab9713a /gprof
parent0818c12a55c2aba820b8f7c7774bcdc698b757ee (diff)
downloadfsf-binutils-gdb-8e1a114b75cd91c110ca78b6eee8ad3df494ddab.zip
fsf-binutils-gdb-8e1a114b75cd91c110ca78b6eee8ad3df494ddab.tar.gz
fsf-binutils-gdb-8e1a114b75cd91c110ca78b6eee8ad3df494ddab.tar.bz2
2002-07-24 Dave Brolley <brolley@redhat.com>
* corefile.c (core_create_function_syms): Use the end of the section containing the symbol to compute max_vma.
Diffstat (limited to 'gprof')
-rw-r--r--gprof/ChangeLog5
-rw-r--r--gprof/corefile.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index 1cbf373..1d726d1 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-24 Dave Brolley <brolley@redhat.com>
+
+ * corefile.c (core_create_function_syms): Use the end of the section
+ containing the symbol to compute max_vma.
+
2002-07-24 Nick Clifton <nickc@redhat.com>
* po/sv.po: Updated Swedish translation.
diff --git a/gprof/corefile.c b/gprof/corefile.c
index fdebc88..74e78f5 100644
--- a/gprof/corefile.c
+++ b/gprof/corefile.c
@@ -542,8 +542,15 @@ core_create_function_syms (cbfd)
if (class == 't')
symtab.limit->is_static = true;
+ /* Keep track of the minimum and maximum vma addresses used by all
+ symbols. When computing the max_vma, use the ending address of the
+ section containing the symbol, if available. */
min_vma = MIN (symtab.limit->addr, min_vma);
- max_vma = MAX (symtab.limit->addr, max_vma);
+ if (core_syms[i]->section)
+ max_vma = MAX (core_syms[i]->section->vma
+ + core_syms[i]->section->_cooked_size - 1, max_vma);
+ else
+ max_vma = MAX (symtab.limit->addr, max_vma);
/* If we see "main" without an initial '_', we assume names
are *not* prefixed by '_'. */