This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] change argument type to bfd_byte
- From: Trevor Saunders <tbsaunde at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 20 Apr 2016 10:52:54 -0000
- Subject: [binutils-gdb] change argument type to bfd_byte
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b98e6871247e1ef764360f6d042254ce4af62ca4
commit b98e6871247e1ef764360f6d042254ce4af62ca4
Author: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Date: Wed Apr 13 04:41:23 2016 -0400
change argument type to bfd_byte
We operate on the pointer's target as a set of bytes, and this avoids doing
arithmetic on void * which is undefined in ISO C.
bfd/ChangeLog:
2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
Diff:
---
bfd/ChangeLog | 4 ++++
bfd/elf32-arm.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f538097..fe09bac 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
+
2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in: Regenerated with automake 1.11.6.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 1d506f6..6e27155 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -4241,7 +4241,7 @@ put_thumb_insn (struct elf32_arm_link_hash_table * htab,
static void
put_thumb2_insn (struct elf32_arm_link_hash_table * htab,
- bfd * output_bfd, bfd_vma val, void * ptr)
+ bfd * output_bfd, bfd_vma val, bfd_byte * ptr)
{
/* T2 instructions are 16-bit streamed. */
if (htab->byteswap_code != bfd_little_endian (output_bfd))