readelf: Make version section index sum unsigned
authorMaciej W. Rozycki <macro@imgtec.com>
Thu, 23 Feb 2017 18:16:55 +0000 (18:16 +0000)
committerMaciej W. Rozycki <macro@imgtec.com>
Fri, 24 Feb 2017 13:49:11 +0000 (13:49 +0000)
Make `isum' unsigned like data it is calculated from.

binutils/
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Make
`isum' unsigned.
<SHT_GNU_verneed>: Likewise.

binutils/ChangeLog
binutils/readelf.c

index a528db4..1ab1c2c 100644 (file)
@@ -1,5 +1,11 @@
 2017-02-24  Maciej W. Rozycki  <macro@imgtec.com>
 
+       * readelf.c (process_version_sections) <SHT_GNU_verdef>: Make
+       `isum' unsigned.
+       <SHT_GNU_verneed>: Likewise.
+
+2017-02-24  Maciej W. Rozycki  <macro@imgtec.com>
+
        * readelf.c (process_version_sections) <SHT_GNU_verdef>: Limit
        the number of entries processed by the section size.  Don't
        break out of the loop if `ent.vd_next' is 0.
index cb0da10..6edb364 100644 (file)
@@ -10026,8 +10026,8 @@ process_version_sections (FILE * file)
                Elf_Internal_Verdef ent;
                Elf_External_Verdaux * eaux;
                Elf_Internal_Verdaux aux;
+               unsigned int isum;
                int j;
-               int isum;
 
                /* Check for very large indices.  */
                if (idx > (size_t) (endbuf - (char *) edefs))
@@ -10143,8 +10143,8 @@ process_version_sections (FILE * file)
              {
                Elf_External_Verneed * entry;
                Elf_Internal_Verneed ent;
+               unsigned int isum;
                int j;
-               int isum;
                char * vstart;
 
                if (idx > (size_t) (endbuf - (char *) eneed))