summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog5
-rw-r--r--runtime/sym.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index eb091d01..71cd97e4 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-09 Mark Wielaard <mwielaard@redhat.com>
+
+ * sym.c (_stp_kallsyms_lookup): Correct this_section_offset
+ calculation.
+
2008-09-08 Tim Moore <timoore@redhat.com>
PR 1288
diff --git a/runtime/sym.c b/runtime/sym.c
index dcdbaf69..b594d9c2 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -98,7 +98,7 @@ static const char *_stp_kallsyms_lookup(unsigned long addr, unsigned long *symbo
unsigned long this_section_addr = _stp_modules[midx]->sections[secidx].addr;
unsigned long this_section_offset;
if (addr < this_section_addr) continue;
- this_section_offset = this_section_addr - addr;
+ this_section_offset = addr - this_section_addr;
if (this_section_offset < closest_section_offset)
{
closest_section_offset = this_section_offset;