summaryrefslogtreecommitdiff
path: root/bfd/elf32-avr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2010-06-27 04:07:50 +0000
committerAlan Modra <amodra@bigpond.net.au>2010-06-27 04:07:50 +0000
commit1995df0090ab0d2d6567c32ecd7665d320e55af5 (patch)
treeb83b202dd37eae31c719df5fb29f1f96970c0f9a /bfd/elf32-avr.c
parent7b2094d39f8b2651b4a056bd5d5872ae9406f329 (diff)
downloadbinutils-redhat-1995df0090ab0d2d6567c32ecd7665d320e55af5.tar.gz
fix set but unused variable warnings
Diffstat (limited to 'bfd/elf32-avr.c')
-rw-r--r--bfd/elf32-avr.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 92c5be9d17..a9b41fab25 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1204,7 +1204,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
r_type = ELF32_R_TYPE (rel->r_info);
r_symndx = ELF32_R_SYM (rel->r_info);
- howto = elf_avr_howto_table + ELF32_R_TYPE (rel->r_info);
+ howto = elf_avr_howto_table + r_type;
h = NULL;
sym = NULL;
sec = NULL;
@@ -1431,7 +1431,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
unsigned int sec_shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
- Elf_Internal_Rela *irelalign;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymbuf = NULL;
bfd_vma toaddr;
@@ -1443,10 +1442,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
-
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
@@ -1462,12 +1457,9 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
{
bfd_vma old_reloc_address;
- bfd_vma shrinked_insn_address;
old_reloc_address = (sec->output_section->vma
+ sec->output_offset + irel->r_offset);
- shrinked_insn_address = (sec->output_section->vma
- + sec->output_offset + addr - count);
/* Get the new reloc address. */
if ((irel->r_offset > addr
@@ -1648,8 +1640,6 @@ elf32_avr_relax_section (bfd *abfd,
Elf_Internal_Rela *irel, *irelend;
bfd_byte *contents = NULL;
Elf_Internal_Sym *isymbuf = NULL;
- static asection *last_input_section = NULL;
- static Elf_Internal_Rela *last_reloc = NULL;
struct elf32_avr_link_hash_table *htab;
if (link_info->relocatable)
@@ -1709,11 +1699,6 @@ elf32_avr_relax_section (bfd *abfd,
if (internal_relocs == NULL)
goto error_return;
- if (sec != last_input_section)
- last_reloc = NULL;
-
- last_input_section = sec;
-
/* Walk through the relocs looking for relaxing opportunities. */
irelend = internal_relocs + sec->reloc_count;
for (irel = internal_relocs; irel < irelend; irel++)
@@ -2509,12 +2494,10 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
static bfd_boolean
avr_mark_stub_not_to_be_necessary (struct bfd_hash_entry *bh,
- void *in_arg)
+ void *in_arg ATTRIBUTE_UNUSED)
{
struct elf32_avr_stub_hash_entry *hsh;
- struct elf32_avr_link_hash_table *htab;
- htab = in_arg;
hsh = avr_stub_hash_entry (bh);
hsh->is_actually_needed = FALSE;