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] Fix compile time errors building ARC target on a 32-bit host.


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

commit 23a42089156e63bbd2228675e78cdf1ffae63c51
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jan 21 13:54:11 2016 +0000

    Fix compile time errors building ARC target on a 32-bit host.
    
    	* elf32-arc.c (ADD_RELA): Fix compile time warning errors by
    	changing the type of _loc to be bfd_byte *.
    	(elf_arc_finish_dynamic_symbol): Likewise.

Diff:
---
 bfd/ChangeLog   |  6 ++++++
 bfd/elf32-arc.c | 12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8de494b..9c813ba 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
 2016-01-21  Nick Clifton  <nickc@redhat.com>
 
+	* elf32-arc.c (ADD_RELA): Fix compile time warning errors by
+	changing the type of _loc to be bfd_byte *.
+	(elf_arc_finish_dynamic_symbol): Likewise.
+
+2016-01-21  Nick Clifton  <nickc@redhat.com>
+
 	PR ld/19455
 	* elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
 	class of the linker stub bfd.
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 0931c4e..8a46a2c 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -55,9 +55,9 @@ name_for_global_symbol (struct elf_link_hash_entry *h)
   {									\
     struct elf_link_hash_table *_htab = elf_hash_table (info);		\
     Elf_Internal_Rela _rel;						\
-    bfd_vma _loc;							\
+    bfd_byte * _loc;							\
 									\
-    _loc = (bfd_vma) _htab->srel##SECTION->contents			\
+    _loc = _htab->srel##SECTION->contents				\
       + ((_htab->srel##SECTION->reloc_count)				\
 	 * sizeof (Elf32_External_Rela));				\
     _htab->srel##SECTION->reloc_count++;				\
@@ -65,7 +65,7 @@ name_for_global_symbol (struct elf_link_hash_entry *h)
     _rel.r_offset = (_htab->s##SECTION)->output_section->vma		\
       + (_htab->s##SECTION)->output_offset + OFFSET;			\
     _rel.r_info = ELF32_R_INFO (SYM_IDX, TYPE);				\
-    bfd_elf32_swap_reloca_out (BFD, &_rel, (bfd_byte *) _loc);		\
+    bfd_elf32_swap_reloca_out (BFD, &_rel, _loc);			\
   }
 
 struct arc_local_data
@@ -2245,8 +2245,8 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
 	bfd_get_section_by_name (h->root.u.def.section->owner,
 				 ".rela.bss");
 
-      bfd_vma loc = (bfd_vma) srelbss->contents
-		    + (srelbss->reloc_count * sizeof (Elf32_External_Rela));
+      bfd_byte * loc = srelbss->contents
+	+ (srelbss->reloc_count * sizeof (Elf32_External_Rela));
       srelbss->reloc_count++;
 
       Elf_Internal_Rela rel;
@@ -2254,7 +2254,7 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
       rel.r_offset = rel_offset;
       rel.r_info = ELF32_R_INFO (h->dynindx, R_ARC_COPY);
 
-      bfd_elf32_swap_reloca_out (output_bfd, &rel, (bfd_byte *) loc);
+      bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */


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