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] ARC/BFD: Fix a build error from `index' shadowing a global declaration


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

commit 840855c5edfb840a97fb063fd8f44a7e9e537b87
Author: Maciej W. Rozycki <macro@imgtec.com>
Date:   Mon Jan 25 16:06:46 2016 +0000

    ARC/BFD: Fix a build error from `index' shadowing a global declaration
    
    	bfd/
    	* elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
    	`dynindx'.

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

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index dcd6ea1..85ac9c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-25  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
+	`dynindx'.
+
 2016-01-25  Nick Clifton  <nickc@redhat.com>
 
 	PR target/19435
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 8a46a2c..8ffc23a 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -2192,10 +2192,10 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
 	      BFD_ASSERT (list->type != GOT_TLS_GD
 			  || list->existing_entries == MOD_AND_OFF);
 
-	      bfd_vma index = h->dynindx == -1 ? 0 : h->dynindx;
+	      bfd_vma dynindx = h->dynindx == -1 ? 0 : h->dynindx;
 	      if (e == MOD_AND_OFF || e == MOD)
 		{
-		  ADD_RELA (output_bfd, got, got_offset, index,
+		  ADD_RELA (output_bfd, got, got_offset, dynindx,
 			    R_ARC_TLS_DTPMOD, 0);
 		  ARC_DEBUG ("arc_info: TLS_DYNRELOC: type = %d, \
 GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
@@ -2203,7 +2203,7 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
 			     got_offset,
 			     htab->sgot->output_section->vma
 			     + htab->sgot->output_offset + got_offset,
-			     index, 0);
+			     dynindx, 0);
 		}
 	      if (e == MOD_AND_OFF || e == OFF)
 		{
@@ -2214,7 +2214,7 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
 
 		  ADD_RELA (output_bfd, got,
 			    got_offset + (e == MOD_AND_OFF ? 4 : 0),
-			    index,
+			    dynindx,
 			    (list->type == GOT_TLS_IE ?
 			     R_ARC_TLS_TPOFF : R_ARC_TLS_DTPOFF),
 			    addend);
@@ -2225,7 +2225,7 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
 			     got_offset,
 			     htab->sgot->output_section->vma
 			     + htab->sgot->output_offset + got_offset,
-			     index, addend);
+			     dynindx, addend);
 		}
 	    }


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