Fix an invalid free called when attempting to link a COFF object against an ELF archi...
[deliverable/binutils-gdb.git] / bfd / cofflink.c
index 32d62bd9b87208cbab2c20bf45e6e225cb7f73ae..5b18e5451857a71c8c88d0f2e5a22acf8b14f53f 100644 (file)
@@ -212,6 +212,10 @@ coff_link_check_archive_element (bfd *abfd,
   if (h->type != bfd_link_hash_undefined)
     return TRUE;
 
+  /* PR 22369 - Skip non COFF objects in the archive.  */
+  if (! bfd_family_coff (abfd))
+    return TRUE;
+
   /* Include this element?  */
   if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd))
     return TRUE;
This page took 0.023691 seconds and 4 git commands to generate.