]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwfl_segment_report_module: Fix jump-start of NDX-finding loop.
authorRoland McGrath <roland@redhat.com>
Wed, 5 May 2010 01:03:42 +0000 (18:03 -0700)
committerRoland McGrath <roland@redhat.com>
Wed, 5 May 2010 02:49:18 +0000 (19:49 -0700)
libdwfl/ChangeLog
libdwfl/dwfl_segment_report_module.c

index fe3e91ef854d68d02585dacf2bcb4395fc3971c4..5067ff7d46931507523fc9e5c47940f74eabc95b 100644 (file)
@@ -1,5 +1,8 @@
 2010-05-04  Roland McGrath  <roland@redhat.com>
 
+       * dwfl_segment_report_module.c (dwfl_segment_report_module):
+       Fix jump-start of NDX-finding loop.
+
        * segment.c (insert): Fix moving of values following insertion.
        (reify_segments): Fix up MOD->segment backpointer indices after
        later insertions in the main loop invalidate them.
index 5f982f4144ef150bdb7f317980c33ad01d62105e..c91120bb853354b5d4148ece82ac0b2e434dd853 100644 (file)
@@ -111,7 +111,9 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
   if (segment >= dwfl->lookup_elts)
     segment = dwfl->lookup_elts - 1;
 
-  while (segment > 0 && dwfl->lookup_segndx[segment] > ndx)
+  while (segment > 0
+        && (dwfl->lookup_segndx[segment] > ndx
+            || dwfl->lookup_segndx[segment] == -1))
     --segment;
 
   while (dwfl->lookup_segndx[segment] < ndx)