* elf32-m68k.c (elf_m68k_gc_sweep_hook): Terminate early
authorKazu Hirata <kazu@codesourcery.com>
Thu, 8 Jan 2004 11:01:37 +0000 (11:01 +0000)
committerKazu Hirata <kazu@codesourcery.com>
Thu, 8 Jan 2004 11:01:37 +0000 (11:01 +0000)
if no dynamic object is present.  Declare r_symndx and h in an
inner scope.

bfd/ChangeLog
bfd/elf32-m68k.c

index eec219a4ef1ea34406c9e3f40775786d75191f01..3bf3ed2a0bffd76da1189ed31ed1fc3d7fa2f08f 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-08  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * elf32-m68k.c (elf_m68k_gc_sweep_hook): Terminate early
+       if no dynamic object is present.  Declare r_symndx and h in an
+       inner scope.
+
 2004-01-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
index 90609c5c08b9b79014049bed2e6c0cc59ec602ea..1c7fed92baadf9ffe45c2b145d8e59a0ecd1d40b 100644 (file)
@@ -817,26 +817,27 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
   struct elf_link_hash_entry **sym_hashes;
   bfd_signed_vma *local_got_refcounts;
   const Elf_Internal_Rela *rel, *relend;
-  unsigned long r_symndx;
-  struct elf_link_hash_entry *h;
   bfd *dynobj;
   asection *sgot;
   asection *srelgot;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  sym_hashes = elf_sym_hashes (abfd);
-  local_got_refcounts = elf_local_got_refcounts (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);
+  local_got_refcounts = elf_local_got_refcounts (abfd);
+
   sgot = bfd_get_section_by_name (dynobj, ".got");
   srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
 
   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_68K_GOT8:
This page took 0.041041 seconds and 4 git commands to generate.