summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2011-10-31 15:33:49 +0100
committerMark Wielaard <mjw@redhat.com>2011-10-31 22:43:29 +0100
commit75ee33f4eee8570d3cf1abf778413276184eea18 (patch)
tree44ad8e5ed9bc36174d807fed921b5079fc61f450
parent387998b4de0e2a7691155e3c6646257d95b556ba (diff)
dwfl_module_addrsym update sizeless_sym only if closer to desired addr.
-rw-r--r--libdwfl/ChangeLog5
-rw-r--r--libdwfl/dwfl_module_addrsym.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index adf3efac..97caf0bc 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-31 Mark Wielaard <mjw@redhat.com>
+
+ * dwfl_module_addrsym.c (dwfl_module_addrsym): Only update
+ sizeless_sym if needed and closer to desired addr.
+
2011-10-20 Mark Wielaard <mjw@redhat.com>
* derelocate.c (cache_sections): Intern mod->reloc_info check.
diff --git a/libdwfl/dwfl_module_addrsym.c b/libdwfl/dwfl_module_addrsym.c
index a9f98f44..41ff4654 100644
--- a/libdwfl/dwfl_module_addrsym.c
+++ b/libdwfl/dwfl_module_addrsym.c
@@ -138,7 +138,9 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr,
closest_shndx = shndx;
closest_name = name;
}
- else if (same_section (&sym, shndx))
+ else if (closest_name == NULL
+ && sym.st_value >= min_label
+ && same_section (&sym, shndx))
{
/* Handwritten assembly symbols sometimes have no
st_size. If no symbol with proper size includes