An off-by-one error in the code to catch bogus vn_next fields meant that
authorNick Clifton <nickc@redhat.com>
Thu, 20 Mar 2014 13:15:12 +0000 (13:15 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 20 Mar 2014 13:15:12 +0000 (13:15 +0000)
linker testsuite failures were showing up for the cris target.  Fixed by
this patch.

* readelf.c (process_version_sections): Fix off-by-one error in
previous delta.

binutils/ChangeLog
binutils/readelf.c

index 03a1e18cda282dc2d080cf6f51d0a89568825309..0f2707b44cd69625a640fa5b0ec84c187e8352ca 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-20  Nick Clifton  <nickc@redhat.com>
+
+       * readelf.c (process_version_sections): Fix off-by-one error in
+       previous delta.
+
 2014-03-19  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/16723
index 79137e3b3ed63c8cce0d251f175e4f8bd5df9b55..c757a63ede6d2c47fc710b707c853e01bb1f13cb 100644 (file)
@@ -8971,7 +8971,7 @@ process_version_sections (FILE * file)
                if (j < ent.vn_cnt)
                  warn (_("Missing Version Needs auxillary information\n"));
 
-               if (ent.vn_next == 0 && cnt < section->sh_info)
+               if (ent.vn_next == 0 && cnt < section->sh_info - 1)
                  {
                    warn (_("Corrupt Version Needs structure - offset to next structure is zero with entries still left to be processed\n"));
                    cnt = section->sh_info;