aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-microblaze.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-microblaze.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-microblaze.c')
-rw-r--r--bfd/elf32-microblaze.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index c975e76..4c5a38d 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -1284,7 +1284,7 @@ microblaze_elf_relax_section (bfd *abfd,
bfd_byte *free_contents = NULL;
int rel_count;
unsigned int shndx;
- int i, index;
+ int i, sym_index;
asection *o;
struct elf_link_hash_entry *sym_hash;
Elf_Internal_Sym *isymbuf, *isymend;
@@ -1319,8 +1319,7 @@ microblaze_elf_relax_section (bfd *abfd,
0, NULL, NULL, NULL);
BFD_ASSERT (isymbuf != NULL);
- internal_relocs = _bfd_elf_link_read_relocs
- (abfd, sec, NULL, NULL, link_info->keep_memory);
+ internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, link_info->keep_memory);
if (internal_relocs == NULL)
goto error_return;
if (! link_info->keep_memory)
@@ -1364,7 +1363,6 @@ microblaze_elf_relax_section (bfd *abfd,
if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
/* A local symbol. */
- Elf_Internal_Sym *isym;
asection *sym_sec;
isym = isymbuf + ELF32_R_SYM (irel->r_info);
@@ -1464,7 +1462,6 @@ microblaze_elf_relax_section (bfd *abfd,
range to be adjusted, and hence must be changed. */
if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
- Elf_Internal_Sym *isym;
isym = isymbuf + ELF32_R_SYM (irel->r_info);
/* Only handle relocs against .text. */
if (isym->st_shndx == shndx
@@ -1507,7 +1504,7 @@ microblaze_elf_relax_section (bfd *abfd,
/* Look through all other sections. */
for (o = abfd->sections; o != NULL; o = o->next)
{
- Elf_Internal_Rela *internal_relocs;
+ Elf_Internal_Rela *irelocs;
Elf_Internal_Rela *irelscan, *irelscanend;
bfd_byte *ocontents;
@@ -1519,13 +1516,13 @@ microblaze_elf_relax_section (bfd *abfd,
/* We always cache the relocs. Perhaps, if info->keep_memory is
FALSE, we should free them, if we are permitted to. */
- internal_relocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, TRUE);
- if (internal_relocs == NULL)
+ irelocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, TRUE);
+ if (irelocs == NULL)
goto error_return;
ocontents = NULL;
- irelscanend = internal_relocs + o->reloc_count;
- for (irelscan = internal_relocs; irelscan < irelscanend; irelscan++)
+ irelscanend = irelocs + o->reloc_count;
+ for (irelscan = irelocs; irelscan < irelscanend; irelscan++)
{
if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)
{
@@ -1745,9 +1742,9 @@ microblaze_elf_relax_section (bfd *abfd,
/* Now adjust the global symbols defined in this section. */
isym = isymbuf + symtab_hdr->sh_info;
isymend = isymbuf + (symtab_hdr->sh_size / sizeof (Elf32_External_Sym));
- for (index = 0; isym < isymend; isym++, index++)
+ for (sym_index = 0; isym < isymend; isym++, sym_index++)
{
- sym_hash = elf_sym_hashes (abfd)[index];
+ sym_hash = elf_sym_hashes (abfd)[sym_index];
if (isym->st_shndx == shndx
&& (sym_hash->root.type == bfd_link_hash_defined
|| sym_hash->root.type == bfd_link_hash_defweak)