aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-vax.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2004-01-11 07:40:24 +0000
committerKazu Hirata <kazu@codesourcery.com>2004-01-11 07:40:24 +0000
commitbabfd660dd0669b0a6a3b8302f9c37d00c714443 (patch)
tree1a8e74032e53f476a6b4eaca0e824bf21219ed58 /bfd/elf32-vax.c
parent4e7b0cd39d9e3916aaa60d97945124ac4832a0c2 (diff)
downloadgdb-babfd660dd0669b0a6a3b8302f9c37d00c714443.zip
gdb-babfd660dd0669b0a6a3b8302f9c37d00c714443.tar.gz
gdb-babfd660dd0669b0a6a3b8302f9c37d00c714443.tar.bz2
* elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
dynamic object is present. Declare r_symndx and h in an inner scope. * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r--bfd/elf32-vax.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index c37ca00..e085e35 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -892,20 +892,21 @@ elf_vax_gc_sweep_hook (abfd, info, sec, relocs)
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel, *relend;
- unsigned long r_symndx;
- struct elf_link_hash_entry *h;
bfd *dynobj;
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
-
dynobj = elf_hash_table (info)->dynobj;
if (dynobj == NULL)
return TRUE;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; rel++)
{
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+
switch (ELF32_R_TYPE (rel->r_info))
{
case R_VAX_GOT32: