* elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
authorAlan Modra <amodra@gmail.com>
Tue, 26 Mar 2002 11:54:12 +0000 (11:54 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 26 Mar 2002 11:54:12 +0000 (11:54 +0000)
bfd/ChangeLog
bfd/elflink.h

index 3b5315033a5f34555bbe5e42e2db0f648b2ba6f4..28f8b3280b91d6f5d418731e6cb13cba6135e67f 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-26  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
+
 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
 
        * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
index d84f2a5f08fc0cd37a5a7c8bc2d6662b9d6d5e86..43abe17bce86bdad2844d86c6ffd8ddbbd3d51d3 100644 (file)
@@ -7570,11 +7570,15 @@ elf_gc_mark (info, sec, gc_mark_hook)
            }
 
          if (rsec && !rsec->gc_mark)
-           if (!elf_gc_mark (info, rsec, gc_mark_hook))
-             {
-               ret = false;
-               goto out2;
-             }
+           {
+             if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour)
+               rsec->gc_mark = 1;
+             else if (!elf_gc_mark (info, rsec, gc_mark_hook))
+               {
+                 ret = false;
+                 goto out2;
+               }
+           }
        }
 
     out2: