* gdbmi.texinfo: Lots of typos and grammar fixes from Brian
[deliverable/binutils-gdb.git] / bfd / elf32-m68k.c
index 06ba12c9983bcc492c7c2883f9b8d01b28181609..38e6e9cb395411d4c6db5a09407ecc3d8f483332 100644 (file)
@@ -855,11 +855,11 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
   local_got_refcounts = elf_local_got_refcounts (abfd);
 
   dynobj = elf_hash_table (info)->dynobj;
-  if (dynobj)
-    {
-      sgot = bfd_get_section_by_name (dynobj, ".got");
-      srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
-    }
+  if (dynobj == NULL)
+    return true;
+
+  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++)
@@ -887,7 +887,7 @@ elf_m68k_gc_sweep_hook (abfd, info, sec, relocs)
                    }
                }
            }
-         else
+         else if (local_got_refcounts != NULL)
            {
              if (local_got_refcounts[r_symndx] > 0)
                {
@@ -1485,7 +1485,8 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
            {
              if (!(info->callbacks->undefined_symbol
                    (info, h->root.root.string, input_bfd,
-                    input_section, rel->r_offset)))
+                    input_section, rel->r_offset,
+                    (!info->shared || info->no_undefined))))
                return false;
              relocation = 0;
            }
This page took 0.025533 seconds and 4 git commands to generate.