diff options
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-rx.c | 6 | ||||
-rw-r--r-- | bfd/mmo.c | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 746adad33d..8f4de696d0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> + + * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *. + * mmo.c (mmo_get_section_contents): Likewise. + (mmo_set_section_contents): Likewise. + 2016-04-26 H.J. Lu <hongjiu.lu@intel.com> * elf-bfd.h (elf_link_hash_table): Update comments for diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index 754eae1d52..147a1a39e4 100644 --- a/bfd/elf32-rx.c +++ b/bfd/elf32-rx.c @@ -3548,7 +3548,7 @@ rx_set_section_contents (bfd * abfd, if (! rv) return rv; - location ++; + location = (bfd_byte *) location + 1; offset ++; count --; caddr ++; @@ -3574,7 +3574,7 @@ rx_set_section_contents (bfd * abfd, } count -= scount; - location += scount; + location = (bfd_byte *) location + scount; offset += scount; if (count > 0) @@ -3593,7 +3593,7 @@ rx_set_section_contents (bfd * abfd, if (! rv) return rv; - location ++; + location = (bfd_byte *) location + 1; offset ++; count --; caddr ++; @@ -2120,7 +2120,7 @@ mmo_get_section_contents (bfd *abfd ATTRIBUTE_UNUSED, memcpy (location, loc, chunk_size); - location += chunk_size; + location = (bfd_byte *) location + chunk_size; bytes_to_do -= chunk_size; offset += chunk_size; } @@ -2657,7 +2657,7 @@ mmo_set_section_contents (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr sec, memcpy (loc, location, chunk_size); - location += chunk_size; + location = (bfd_byte *) location + chunk_size; bytes_to_do -= chunk_size; offset += chunk_size; } |