This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Your infinite-readelf patch caused regressions
- From: Nicholas Clifton <nickc at redhat dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 20 Mar 2014 13:17:59 +0000
- Subject: Re: Your infinite-readelf patch caused regressions
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot BSF dot 2 dot 02 dot 1403191403270 dot 32539 at arjuna dot pair dot com>
Hi Hans-Peter,
Not sure why the infinite-loop test triggers.
It is because those particular tests are running "readelf -a", so the
version information in the binaries is being dumped.
FAIL: ld-cris/pcrelcp-1
FAIL: ld-cris/weakref3
FAIL: ld-cris/weakref4
Sorry about that. It was a silly off-by-one error. Fixed with the
patch below.
Cheers
Nick
binutils/ChangeLog
2014-03-20 Nick Clifton <nickc@redhat.com>
* readelf.c (process_version_sections): Fix off-by-one error in
previous delta.
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 s
till left to be processed\n"));
cnt = section->sh_info;