aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-12-11 13:42:17 +0000
committerNick Clifton <nickc@redhat.com>2009-12-11 13:42:17 +0000
commit91d6fa6a035cc7d0b7be5c99c194a64cb80924b0 (patch)
tree214507c313b77d619b52afcae2af0b02c9fa700b /bfd/elf32-sh.c
parent01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff)
downloadgdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.zip
gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.gz
gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.bz2
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-sh.c')
-rw-r--r--bfd/elf32-sh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 7b81aab..b16e3e1 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -2089,9 +2089,9 @@ get_plt_index (const struct elf_sh_plt_info *info, bfd_vma offset)
/* Do the inverse operation. */
static bfd_vma
-get_plt_offset (const struct elf_sh_plt_info *info, bfd_vma index)
+get_plt_offset (const struct elf_sh_plt_info *info, bfd_vma plt_index)
{
- return info->plt0_entry_size + (index * info->symbol_entry_size);
+ return info->plt0_entry_size + (plt_index * info->symbol_entry_size);
}
/* The sh linker needs to keep track of the number of relocs that it
@@ -2316,7 +2316,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
struct elf_sh_link_hash_table *htab;
flagword flags, pltflags;
- register asection *s;
+ asection *s;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign = 0;
@@ -4043,7 +4043,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
else
{
- int index;
+ int target;
/* IE->LE transition:
mov.l 1f,r0; stc gbr,rN; mov.l @(r0,r12),rM;
@@ -4065,12 +4065,12 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
BFD_ASSERT ((insn & 0xff00) == 0xd000);
- index = insn & 0x00ff;
+ target = insn & 0x00ff;
insn = bfd_get_16 (input_bfd, contents + offset + 2);
BFD_ASSERT ((insn & 0xf0ff) == 0x0012);
insn = bfd_get_16 (input_bfd, contents + offset + 4);
BFD_ASSERT ((insn & 0xf0ff) == 0x00ce);
- insn = 0xd000 | (insn & 0x0f00) | index;
+ insn = 0xd000 | (insn & 0x0f00) | target;
bfd_put_16 (output_bfd, insn, contents + offset + 0);
bfd_put_16 (output_bfd, 0x0009, contents + offset + 4);
}