summaryrefslogtreecommitdiff
path: root/bfd/elf32-score7.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-12-11 13:41:59 +0000
committerNick Clifton <nickc@redhat.com>2009-12-11 13:41:59 +0000
commit5413b5486ba77949122a8bfd6067d31626e330f3 (patch)
tree6956d71f05d79d40e52fed28668bf9db104a4a04 /bfd/elf32-score7.c
parentf28844f209b0de6783df75e402dd1c26f3edb0c7 (diff)
downloadbinutils-redhat-5413b5486ba77949122a8bfd6067d31626e330f3.tar.gz
Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
Diffstat (limited to 'bfd/elf32-score7.c')
-rw-r--r--bfd/elf32-score7.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c
index af37817dde..bb74f28c2f 100644
--- a/bfd/elf32-score7.c
+++ b/bfd/elf32-score7.c
@@ -1650,7 +1650,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;
@@ -1664,17 +1664,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;
@@ -1683,7 +1685,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
@@ -2512,7 +2514,6 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd,
if (r_type == R_SCORE_GOT15)
{
- const Elf_Internal_Rela *relend;
const Elf_Internal_Rela *lo16_rel;
const struct elf_backend_data *bed;
bfd_vma lo_addend = 0, lo_value = 0;