This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] change argument type to bfd_byte
- From: tbsaunde+binutils at tbsaunde dot org
- To: binutils at sourceware dot org
- Cc: Trevor Saunders <tbsaunde+binutils at tbsaunde dot org>
- Date: Fri, 15 Apr 2016 22:14:11 -0400
- Subject: [PATCH] change argument type to bfd_byte
- Authentication-results: sourceware.org; auth=none
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Hi,
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.
built andregtested cross to arm-none-elf, ok?
Trev
bfd/ChangeLog:
2016-04-15 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
---
bfd/elf32-arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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))
--
2.1.4