This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] readelf: Make version section index sum unsigned


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5235cd686141bb5adb57dbbf302a168e9693672b

commit 5235cd686141bb5adb57dbbf302a168e9693672b
Author: Maciej W. Rozycki <macro@imgtec.com>
Date:   Thu Feb 23 18:16:55 2017 +0000

    readelf: Make version section index sum unsigned
    
    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.

Diff:
---
 binutils/ChangeLog | 6 ++++++
 binutils/readelf.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index a528db4..1ab1c2c 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index cb0da10..6edb364 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -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))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]