From 67a66a8b72d19dc1a1fd10db1c55e31a6e93b270 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 9 Sep 2008 11:42:28 +0200 Subject: Correct this_section_offset calculation in _stp_kallsyms_lookup. --- runtime/ChangeLog | 5 +++++ runtime/sym.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime') 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 + + * sym.c (_stp_kallsyms_lookup): Correct this_section_offset + calculation. + 2008-09-08 Tim Moore 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; -- cgit