PR 324
authorNick Clifton <nickc@redhat.com>
Wed, 18 Aug 2004 09:44:11 +0000 (09:44 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 18 Aug 2004 09:44:11 +0000 (09:44 +0000)
(coff_link_add_symbols): Check that the comdat pointer in the coff_section_data
structure has been initialised before using it.

bfd/ChangeLog
bfd/cofflink.c

index 7c24b394a34b3d19df4a9f7e2894b8674aaf8271..f9f11261d5c8ea6f8d0a5fc9c93a050cfcdd1a9a 100644 (file)
@@ -1,3 +1,10 @@
+2004-08-18  Nick Clifton  <nickc@redhat.com>
+
+       PR 324
+       * cofflink.c (coff_link_add_symbols): Check that the comdat
+       pointer in the coff_section_data structure has been initialised
+       before using it.
+
 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
 
        PR 338
index 6520669f282dca5d8bbfe6c12d7cb6ba485e0f1a..ca144cc4929345f8709c94140625b66429b89422 100644 (file)
@@ -435,6 +435,7 @@ coff_link_add_symbols (bfd *abfd,
          if (obj_pe (abfd)
              && (classification == COFF_SYMBOL_GLOBAL
                  || classification == COFF_SYMBOL_PE_SECTION)
+             && coff_section_data (abfd, section) != NULL
              && coff_section_data (abfd, section)->comdat != NULL
              && strncmp (name, "??_", 3) == 0
              && strcmp (name, coff_section_data (abfd, section)->comdat->name) == 0)