]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwfl_module_addrsym update sizeless_sym only if closer to desired addr.
authorMark Wielaard <mjw@redhat.com>
Mon, 31 Oct 2011 14:33:49 +0000 (15:33 +0100)
committerMark Wielaard <mjw@redhat.com>
Mon, 31 Oct 2011 21:43:29 +0000 (22:43 +0100)
libdwfl/ChangeLog
libdwfl/dwfl_module_addrsym.c

index adf3efac45354d3b30b5ca947ed6ea3f6ee4be10..97caf0bc592a7af31ee405ef19ad23b6df9bf46f 100644 (file)
@@ -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.
index a9f98f4483484a5df885405f9c8815307b6a0483..41ff46541ecab6d2da741185371ed219fa8a139f 100644 (file)
@@ -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