d1c45d0
diff -rup binutils-2.25.1.orig/bfd/ihex.c binutils-2.25.1/bfd/ihex.c
d1c45d0
--- binutils-2.25.1.orig/bfd/ihex.c	2015-08-04 17:10:24.766693094 +0100
d1c45d0
+++ binutils-2.25.1/bfd/ihex.c	2015-08-04 17:10:44.824807881 +0100
d1c45d0
@@ -219,7 +219,7 @@ ihex_bad_byte (bfd *abfd, unsigned int l
d1c45d0
       char buf[10];
d1c45d0
 
d1c45d0
       if (! ISPRINT (c))
d1c45d0
-	sprintf (buf, "\\%03o", (unsigned int) c);
d1c45d0
+	sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
d1c45d0
       else
d1c45d0
 	{
d1c45d0
 	  buf[0] = c;
d1c45d0
@@ -276,7 +276,7 @@ ihex_scan (bfd *abfd)
d1c45d0
       else
d1c45d0
 	{
d1c45d0
 	  file_ptr pos;
d1c45d0
-	  char hdr[8];
d1c45d0
+	  unsigned char hdr[8];
d1c45d0
 	  unsigned int i;
d1c45d0
 	  unsigned int len;
d1c45d0
 	  bfd_vma addr;
d1c45d0
@@ -553,7 +553,7 @@ ihex_read_section (bfd *abfd, asection *
d1c45d0
   error = FALSE;
d1c45d0
   while ((c = ihex_get_byte (abfd, &error)) != EOF)
d1c45d0
     {
d1c45d0
-      char hdr[8];
d1c45d0
+      unsigned char hdr[8];
d1c45d0
       unsigned int len;
d1c45d0
       unsigned int type;
d1c45d0
       unsigned int i;
d1c45d0
diff -rup binutils-2.25.1.orig/bfd/srec.c binutils-2.25.1/bfd/srec.c
d1c45d0
--- binutils-2.25.1.orig/bfd/srec.c	2015-08-04 17:10:24.774693139 +0100
d1c45d0
+++ binutils-2.25.1/bfd/srec.c	2015-08-04 17:10:44.824807881 +0100
d1c45d0
@@ -249,7 +249,7 @@ srec_bad_byte (bfd *abfd,
d1c45d0
       char buf[40];
d1c45d0
 
d1c45d0
       if (! ISPRINT (c))
d1c45d0
-	sprintf (buf, "\\%03o", (unsigned int) c);
d1c45d0
+	sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
d1c45d0
       else
d1c45d0
 	{
d1c45d0
 	  buf[0] = c;
d1c45d0
diff -rup binutils-2.25.1.orig/binutils/readelf.c binutils-2.25.1/binutils/readelf.c
d1c45d0
--- binutils-2.25.1.orig/binutils/readelf.c	2015-08-04 17:10:24.856693609 +0100
d1c45d0
+++ binutils-2.25.1/binutils/readelf.c	2015-08-04 17:10:44.829807910 +0100
d1c45d0
@@ -13838,7 +13838,7 @@ process_mips_specific (FILE * file)
d1c45d0
 	      len = sizeof (* eopt);
d1c45d0
 	      while (len < option->size)
d1c45d0
 		{
d1c45d0
-		  char datum = * ((char *) eopt + offset + len);
d1c45d0
+		  unsigned char datum = * ((unsigned char *) eopt + offset + len);
d1c45d0
 
d1c45d0
 		  if (ISPRINT (datum))
d1c45d0
 		    printf ("%c", datum);
d1c45d0
Only in binutils-2.25.1/binutils: readelf.c.orig