Add -Wshadow to the gcc command line options used when compiling the binutils.
[deliverable/binutils-gdb.git] / bfd / elf32-score.c
index d5e21b5383d5ecfbe90a5aa9cb7916a6bedd6f9f..15612d37954406ea5a8d11bc49edc6e260abdc6f 100644 (file)
@@ -1755,7 +1755,7 @@ score_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
 static bfd_vma
 score_elf_global_got_index (bfd *abfd, struct elf_link_hash_entry *h)
 {
-  bfd_vma index;
+  bfd_vma got_index;
   asection *sgot;
   struct score_got_info *g;
   long global_got_dynindx = 0;
@@ -1769,16 +1769,19 @@ score_elf_global_got_index (bfd *abfd, struct elf_link_hash_entry *h)
      indices into the GOT.  That makes it easy to calculate the GOT
      offset.  */
   BFD_ASSERT (h->dynindx >= global_got_dynindx);
-  index = ((h->dynindx - global_got_dynindx + g->local_gotno) * SCORE_ELF_GOT_SIZE (abfd));
-  BFD_ASSERT (index < sgot->size);
+  got_index = ((h->dynindx - global_got_dynindx + g->local_gotno) * SCORE_ELF_GOT_SIZE (abfd));
+  BFD_ASSERT (got_index < sgot->size);
 
-  return index;
+  return got_index;
 }
 
 /* Returns the offset for the entry at the INDEXth position in the GOT.  */
+
 static bfd_vma
-score_elf_got_offset_from_index (bfd *dynobj, bfd *output_bfd,
-                                 bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma index)
+score_elf_got_offset_from_index (bfd *dynobj,
+                                bfd *output_bfd,
+                                 bfd *input_bfd ATTRIBUTE_UNUSED,
+                                bfd_vma got_index)
 {
   asection *sgot;
   bfd_vma gp;
@@ -1787,7 +1790,7 @@ score_elf_got_offset_from_index (bfd *dynobj, bfd *output_bfd,
   g = score_elf_got_info (dynobj, &sgot);
   gp = _bfd_get_gp_value (output_bfd);
 
-  return sgot->output_section->vma + sgot->output_offset + index - gp;
+  return sgot->output_section->vma + sgot->output_offset + got_index - gp;
 }
 
 /* Follow indirect and warning hash entries so that each got entry
@@ -3068,7 +3071,7 @@ s3_bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym)
     }
 }
 
-static bfd_boolean
+static int
 s3_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED,
                                           const char *name ATTRIBUTE_UNUSED,
                                           Elf_Internal_Sym *sym,
@@ -3081,7 +3084,7 @@ s3_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_U
   if (sym->st_shndx == SHN_COMMON && strcmp (input_sec->name, ".scommon") == 0)
     sym->st_shndx = SHN_SCORE_SCOMMON;
 
-  return TRUE;
+  return 1;
 }
 
 static bfd_boolean
@@ -4179,7 +4182,7 @@ _bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym)
     return s7_bfd_score_elf_symbol_processing (abfd, asym);
 }
 
-static bfd_boolean
+static int
 _bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED,
      const char *name ATTRIBUTE_UNUSED,
      Elf_Internal_Sym *sym,
@@ -4194,7 +4197,7 @@ _bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNU
          common in the output file.  */
       if (sym->st_shndx == SHN_COMMON && strcmp (input_sec->name, ".scommon") == 0)
         sym->st_shndx = SHN_SCORE_SCOMMON;
-      return TRUE;
+      return 1;
     }
 
   if (bfd_get_mach (info->input_bfds) == bfd_mach_score3)
This page took 0.025139 seconds and 4 git commands to generate.