aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-avr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-06-27 04:07:55 +0000
committerAlan Modra <amodra@gmail.com>2010-06-27 04:07:55 +0000
commitc7e2358a8849d7540212543e1a2acbac648cb973 (patch)
treea882f5a804c7dca6bde423d24e5b13b1a3eeff32 /bfd/elf32-avr.c
parent1addfd92eb085db42013c4d45e3df8bf2053cde4 (diff)
downloadgdb-c7e2358a8849d7540212543e1a2acbac648cb973.zip
gdb-c7e2358a8849d7540212543e1a2acbac648cb973.tar.gz
gdb-c7e2358a8849d7540212543e1a2acbac648cb973.tar.bz2
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 92c5be9..a9b41fa 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;