(elf32_m68hc11_relocate_section): Initialise variables that are passed by
authorNick Clifton <nickc@redhat.com>
Wed, 23 Feb 2005 11:18:11 +0000 (11:18 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 23 Feb 2005 11:18:11 +0000 (11:18 +0000)
reference to m68hc11_get_relocation_value in case that function does not
initialise them.

bfd/ChangeLog
bfd/elf32-m68hc1x.c

index fbece3facda9a4055b79d5248046b1a2ddc4de4d..585570f6357ef9ceb02e9f996f7d87050f627be3 100644 (file)
@@ -1,5 +1,10 @@
 2005-02-23  Nick Clifton  <nickc@redhat.com>
 
+       * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
+       variables that are passed by reference to
+       m68hc11_get_relocation_value in case that function does not
+       initialise them.
+
        * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
        return statements and replace with a single return at the end of
        the function.  This helps pacify the flow analysis code in gcc 4.0.
index eeab9d53f49c4be138706d3b220abaf3881e689a..a0ba487ea14af05d6f381bd53b3baab3a54644d5 100644 (file)
@@ -1000,7 +1000,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel, *relend;
-  const char *name;
+  const char *name = NULL;
   struct m68hc11_page_info *pinfo;
   const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
 
@@ -1021,13 +1021,13 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
       unsigned long r_symndx;
       Elf_Internal_Sym *sym;
       asection *sec;
-      bfd_vma relocation;
+      bfd_vma relocation = 0;
       bfd_reloc_status_type r = bfd_reloc_undefined;
       bfd_vma phys_page;
       bfd_vma phys_addr;
       bfd_vma insn_addr;
       bfd_vma insn_page;
-      bfd_boolean is_far;
+      bfd_boolean is_far = FALSE;
 
       r_symndx = ELF32_R_SYM (rel->r_info);
       r_type = ELF32_R_TYPE (rel->r_info);