aboutsummaryrefslogtreecommitdiff
path: root/ld/pe-dll.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 /ld/pe-dll.c
parent1addfd92eb085db42013c4d45e3df8bf2053cde4 (diff)
downloadgdb-c7e2358a8849d7540212543e1a2acbac648cb973.zip
gdb-c7e2358a8849d7540212543e1a2acbac648cb973.tar.gz
gdb-c7e2358a8849d7540212543e1a2acbac648cb973.tar.bz2
fix set but unused variable warnings
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r--ld/pe-dll.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 47722b6..9d3ee5d 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -1154,7 +1154,7 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
/* Note use of array pointer math here. */
edirectory = edata_d;
- eaddresses = edata_d + 40;
+ eaddresses = edirectory + 40;
enameptrs = eaddresses + 4 * export_table_size;
eordinals = enameptrs + 4 * count_exported_byname;
enamestr = (char *) eordinals + 2 * count_exported_byname;
@@ -1247,7 +1247,6 @@ pe_walk_relocs_of_symbol (struct bfd_link_info *info,
for (b = info->input_bfds; b; b = b->link_next)
{
asymbol **symbols;
- int nsyms;
if (!bfd_generic_link_read_symbols (b))
{
@@ -1256,7 +1255,6 @@ pe_walk_relocs_of_symbol (struct bfd_link_info *info,
}
symbols = bfd_get_outsymbols (b);
- nsyms = bfd_get_symcount (b);
for (s = b->sections; s; s = s->next)
{
@@ -1326,7 +1324,6 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
{
bfd_vma sec_vma = s->output_section->vma + s->output_offset;
asymbol **symbols;
- int nsyms;
/* If it's not loaded, we don't need to relocate it this way. */
if (!(s->output_section->flags & SEC_LOAD))
@@ -1353,7 +1350,6 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
}
symbols = bfd_get_outsymbols (b);
- nsyms = bfd_get_symcount (b);
relsize = bfd_get_reloc_upper_bound (b, s);
relocs = xmalloc (relsize);
nrelocs = bfd_canonicalize_reloc (b, s, relocs, symbols);
@@ -1368,7 +1364,6 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
if (!relocs[i]->howto->pc_relative
&& relocs[i]->howto->type != pe_details->imagebase_reloc)
{
- bfd_vma sym_vma;
struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
/* Don't create relocs for undefined weak symbols. */
@@ -1400,11 +1395,6 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
continue;
}
- sym_vma = (relocs[i]->addend
- + sym->value
- + sym->section->vma
- + sym->section->output_offset
- + sym->section->output_section->vma);
reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;
#define BITS_AND_SHIFT(bits, shift) (bits * 1000 | shift)
@@ -2992,7 +2982,7 @@ pe_implied_import_dll (const char *filename)
bfd_vma exp_funcbase;
unsigned char *expdata;
char *erva;
- bfd_vma name_rvas, ordinals, nexp, ordbase;
+ bfd_vma name_rvas, nexp;
const char *dllname;
/* Initialization with start > end guarantees that is_data
will not be set by mistake, and avoids compiler warning. */
@@ -3126,8 +3116,6 @@ pe_implied_import_dll (const char *filename)
nexp = pe_as32 (expdata + 24);
name_rvas = pe_as32 (expdata + 32);
- ordinals = pe_as32 (expdata + 36);
- ordbase = pe_as32 (expdata + 16);
exp_funcbase = pe_as32 (expdata + 28);
/* Use internal dll name instead of filename