aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-03-20 13:15:12 +0000
committerNick Clifton <nickc@redhat.com>2014-03-20 13:15:12 +0000
commitbcf83b2a66f0d968b51af8357f1543523ef83470 (patch)
treeb0c7bf976d4b3438c28761dd87c1fabaf55d2762 /binutils
parent97323ad11305610185a0265392cabcd37510f50e (diff)
downloadfsf-binutils-gdb-bcf83b2a66f0d968b51af8357f1543523ef83470.zip
fsf-binutils-gdb-bcf83b2a66f0d968b51af8357f1543523ef83470.tar.gz
fsf-binutils-gdb-bcf83b2a66f0d968b51af8357f1543523ef83470.tar.bz2
An off-by-one error in the code to catch bogus vn_next fields meant that
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.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 03a1e18..0f2707b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 79137e3..c757a63 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -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;