* elflink.c (elf_gc_sweep): Do not refcount on sections that have
authorAlan Modra <amodra@gmail.com>
Wed, 29 Jun 2005 13:56:06 +0000 (13:56 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 29 Jun 2005 13:56:06 +0000 (13:56 +0000)
not been processed by check_relocs.

bfd/ChangeLog
bfd/elflink.c

index 539b3499a0ecd11716a84d9a5961a907b86aae3f..769534b62311e4437fc070bb63758950efb6d5dd 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-29  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (elf_gc_sweep): Do not refcount on sections that have
+       not been processed by check_relocs.
+
 2005-06-29  Paul Brook  <paul@codesourcery.com>
 
        * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
index 0a70c2345e26b8a924477283230617107d360ac9..b561b1f8260bb5729380f976db096bc740a1b40f 100644 (file)
@@ -8902,7 +8902,9 @@ elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
          /* But we also have to update some of the relocation
             info we collected before.  */
          if (gc_sweep_hook
-             && (o->flags & SEC_RELOC) && o->reloc_count > 0)
+             && (o->flags & SEC_RELOC) != 0
+             && o->reloc_count > 0
+             && !bfd_is_abs_section (o->output_section))
            {
              Elf_Internal_Rela *internal_relocs;
              bfd_boolean r;