From 9a008db36edc557367211620903de9f39733169a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 28 Jul 2008 06:46:31 +0000 Subject: [PATCH] * elf32-arm.c (arm_map_one_stub): Declare variables at beginning of block. * elf32-avr.c (get_local_syms): Likewise. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-arm.c | 3 ++- bfd/elf32-avr.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 33b9ccca135..8626b267a20 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2008-07-28 Ineiev + + * elf32-arm.c (arm_map_one_stub): Declare variables at beginning + of block. + * elf32-avr.c (get_local_syms): Likewise. + 2008-07-28 Alan Modra PR 6769 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 8fc1542e8ae..7afd4efe5bd 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -11221,11 +11221,12 @@ arm_map_one_stub (struct bfd_hash_entry *gen_entry, asection *stub_sec; bfd_vma addr; char *stub_name; + output_arch_syminfo *osi; /* Massage our args to the form they really have. */ stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry; + osi = (output_arch_syminfo *) in_arg; - output_arch_syminfo *osi = (output_arch_syminfo *) in_arg; info = osi->info; htab = elf32_arm_hash_table (info); diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index ee2afab8f2b..bab5ca0fc75 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -2590,6 +2590,7 @@ get_local_syms (bfd *input_bfd, struct bfd_link_info *info) unsigned int bfd_indx; Elf_Internal_Sym *local_syms, **all_local_syms; struct elf32_avr_link_hash_table *htab = avr_link_hash_table (info); + bfd_size_type amt; if (htab == NULL) return -1; @@ -2597,7 +2598,7 @@ get_local_syms (bfd *input_bfd, struct bfd_link_info *info) /* We want to read in symbol extension records only once. To do this we need to read in the local symbols in parallel and save them for later use; so hold pointers to the local symbols in an array. */ - bfd_size_type amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count; + amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count; all_local_syms = bfd_zmalloc (amt); htab->all_local_syms = all_local_syms; if (all_local_syms == NULL) -- 2.30.2